How to install the LAMP test server?

I am using xampp for Windows, but I would like to use something closer to setting up my server.

The Federico Cargnelutti tutorial explains how to set up a LAMP VMWARE device; This is an excellent introduction to VMware devices, but one of the commands does not work and does not describe how to change the keyboard layout and time zone.

ps: the commands are easy to find, but I don’t want to look for them every time I reinstall the server. I am using this question as a reminder.

+4
source share
5 answers

This is my installation script, I use it on debian servers, but it will work on Ubuntu (Ubuntu is built on Debian)

apt-get -yq update apt-get -yq upgrade apt-get -yq install sudo apt-get -yq install gcc apt-get -yq install g++ apt-get -yq install make apt-get -yq install apache2 apt-get -yq install php5 apt-get -yq install php5-curl apt-get -yq install php5-mysql apt-get -yq install php5-gd apt-get -yq install mysql-common apt-get -yq install mysql-client apt-get -yq install mysql-server apt-get -yq install phpmyadmin apt-get -yq install samba echo '[global] workgroup = workgroup server string = %h server dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes ;invalid users = root unix password sync = no passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* . socket options = TCP_NODELAY [homes] comment = Home Directories browseable = no writable = no create mask = 0700 directory mask = 0700 valid users = %S [www] comment = WWW writable = yes locking = no path = /var/www public = yes' > /etc/samba/smb.conf (echo SAMBAPASSWORD; echo SAMBAPASSWORD) | smbpasswd -sa root echo 'NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On </VirtualHost>' > /etc/apache2/sites-enabled/000-default /etc/init.d/apache2 stop /etc/init.d/samba stop /etc/init.d/apache2 start /etc/init.d/samba start 

edit: add this to set MySQL password

 /etc/init.d/mysql stop echo "UPDATE mysql.user SET Password=PASSWORD('MySQLPasswrod') WHERE User='root'; FLUSH PRIVILEGES;" > /root/MySQLPassword mysqld_safe --init-file=/root/MySQLPassword & sleep 1 /etc/init.d/mysql stop sleep 1 /etc/init.d/mysql start 

end edit

This is a little specified, but you realized that if you save it to a file (for example, β€œinstall”), follow these steps:

 chmod +x install ./install 

Some of my apt-get commands are not needed because apt automatically gets dependencies, but I prefer to be specific to my installations.

+5
source

Assuming you have a VMware workstation, a VMware player, or something that can run a vmware device, you just need to:

  • Download, unzip Ubuntu 8.04 Server and start the virtual machine.
  • Update ubuntu and set the layout and time zone:
      sudo apt-get update
     sudo apt-get upgrade
     sudo dpkg-reconfigure console-setup
     sudo dpkg-reconfigure tzdata
     sudo vim / etc / network / interfaces
    
  • set a fixed IP (optional).
  • install apache + mysql + php:
      sudo tasksel install lamp-server
    
+5
source

If this question is correctly flagged, you can select the LAMP server option during the installation of Ubuntu. This will automatically install and configure all the necessary components. Detailed instructions on how to do this can be found, for example, there: http://www.ubuntugeek.com/ubuntu-804-hardy-heron-lamp-server-setup.html

+2
source

You can quickly configure LAMP, RoR, Python Django, Java Stack, Spring, etc. Ubuntu-based image servers at http://www.elasticserver.com - now supported by Unbuntu 8.04LTS.

+1
source

I do not really understand your question, because I really did not see it. But I will do my best to make two conclusions: change the keyboard layout, check this forum post on the ubuntu forums and change the time zone, this forum post .

0
source

Source: https://habr.com/ru/post/1276362/


All Articles