Linux Server Administration from Scratch:Day Four


Hi there,how you doing?
Today we gone install other required programs to lunch our private web server,so we will install PHP interpreter,some of the modules and the MySQL server.Before I forgot,after enabling any module as we have seen in previous tutorial,we must restarting apache server with this command: service apache2 restart
Lets go...

Open up a terminal window and connect with your server via ssh as we have learned before that,now we gone install the PHP interpreter and some of its modules,so type this command on your terminal:
apt-get install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagik php5-imap php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
Do not worry,it just a simple modules helping us to lunch the server and make it working fine.Now we move to the next step,but first restart you apache2 server.
Now do to this path by typing a simple cd command: /etc/php5/apache2 ,show all the files and search for file called php.ini and open it with any code editor you like,for me I will choose VI editor.
Search for display_errors and change it value from Off to On,this option is for displaying the errors of the script(websites).Now we gone disable some functions for more safety on our server,search "disabled_functions" and add this 
symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,passthru,escaoeshellarg,escapesellcmd 
then we have to enable UTF-8 encoding,scroll to all down of file and add this:
mbstring.language = UTF-8mbstring.internal_enconding = UTF-8mbstring.http_input = UTF-8mbstring.http_output = UTF-8mbstring.detect_order = auto 
 and we done here,let's move on to installing MySQL server,just type this command and it will be installed perfectly:
apt-get install mysql-server mysql-client mysql-common

when MySQL server installation,you will see window asking you for choosing a password,choose one and typed it twice...after installation is completed,edit /etc/mysql/my.cf with any code editor...search for key_buffer,you will find it 16M change it for 32 M or 64 M:this option is about the memory cache,then search for search_query_limit and change it to 2 M(this option is for uploaded files),then search for query_cache_size and change it for 32 M .
After [mysqld] and after skip-external-locking add this line:
default-character-set = utf8default-collation = utf8_general_ci
Now search for [client] and after socket add this line:
default-character-set = utf8  
we done here,but you have to restart you MySQL server by just typing service mysql start ,and now you must install phpmyadmin to managing your database,it very simple operation,by just simple command,open a terminal and type this command:
apt-get install phpmyadmin 
when the installation is running,window shown and ask you to choose your server between Apache and lighttpd ,you choose Apache by pressing space button,double Enter button pressing,now you see a window ask you to enter the MySQL password,then the password of phpmyadmin...
I am so sorry because I do not use images because I've installing all of these program before a lot of times and I did not found any images explain this topic.
I hope that tutorial will help you,I'm working to keep it simple,so you bring it simple.

Comments