Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- install apache server:
- sudo apt-get install apache2
- after install go to http://localhost/ to check if it is running.
- -------------------------------------------------------------------------------
- install php:
- sudo apt-get install php5 libapache2-mod-php5
- after install create a php file called info.php in the /var/www/ directory:
- <?php
- phpinfo(); ?>
- and then go to http://localhost/info.php to check if php is running correctly.
- -------------------------------------------------------------------------------
- install mysql server:
- sudo apt-get install mysql-server mysql-client php5-mysql
- after install try going to mysql command line:
- sudo mysql -u root -p
- --------------------------------------------------------------------------------
- install phpmyadmin:
- sudo apt-get install phpmyadmin
- after install go to http://localhost/phpmyadmin
- ================================================================================
- create your website virtualhost in apache:
- copy default virtualhost file and modify it:
- sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/yourdomain.com
- modify virtualhost using nano and save changes:
- sudo nano /etc/apache2/sites-available/yourdomain.com
- <VirtualHost *:80>
- ServerAdmin webmaster@yourdomain.com
- ServerName yourdomain.com
- ServerAlias www.yourdomain.com
- [...]
- DocumentRoot /var/www/yourdomain.com/public_html
- </VirtualHost>
- enable your domain:
- sudo a2ensite yourdomain.com
- restart apache server:
- sudo service apache2 restart
- ================================================================================
- configure php for apache:
- edit php config file php.ini:
- sudo nano /etc/php5/apache2/php.ini
- set Directory for the file HTTP upload:
- upload_tmp_dir = "/tmp/upload"
- set Directory for data session save:
- session.save_path = "/tmp/session"
- set Directory for data session cookie save:
- session.cookie_path = "/tmp/cookie"
- create the directories defined in the config file:
- sudo mkdir /tmp/upload
- sudo mkdir /tmp/session
- sudo mkdir /tmp/cookie
- set permission for the directories:
- sudo chmod 777 /tmp/upload
- sudo chmod 777 /tmp/session
- sudo chmod 777 /tmp/cookie
- =================================================================================
- NOTES:
- to activate php5 if not activated:
- a2enmod php5
- alternate php5 installation to support extensions for other application usage.
- like MySQL, Apxs2, gettext, FTP Mbstring, OpenSSL Xml etc:
- sudo apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-mysql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
- =================================================================================
- NOTE:
- Could not reliably determine the server’s fully qualified domain name error:
- sudo nano /etc/apache2/conf.d/name
- add the line:
- ServerName localhost
- sudo service apache2 restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement