SlideShare a Scribd company logo
1 of 38
Download to read offline
L.A.M.P
Installation Note
--- CentOS 6.5
William.L
wiliwe@gmail.com
2014-05-02
(2014-07-18 updated)
Index
CentOS Envrionment Setup........................................................................................................................................................ 6
Show Services be started on System Boot............................................................................................................................. 7
Disable SELinux (Security-Enhanced Linux) ........................................................................................................................... 7
Apache 2 (2.2)............................................................................................................................................................................. 9
Troubleshooting Apache(httpd)........................................................................................................................................... 10
Permission denied: make_sock: could not bind to address [::]:88 (88 is web server port number)............................. 10
Static File Access Forbidden (HTTP 403 Error)................................................................................................................. 13
Apache Log Files.................................................................................................................................................................... 15
MySQL 5 .................................................................................................................................................................................... 17
MySQL Installation Path....................................................................................................................................................... 17
Show MySQL Version............................................................................................................................................................ 17
Show Current Databases...................................................................................................................................................... 18
MySQL Configuration File..................................................................................................................................................... 18
MySQL Log File...................................................................................................................................................................... 19
Verify PhpMyAdmin ............................................................................................................................................................. 19
Enable phpMyAdmin Remote Access .................................................................................................................................. 20
PHP 5......................................................................................................................................................................................... 21
PHP Configuration Files ........................................................................................................................................................ 22
Configure PHP....................................................................................................................................................................... 22
Check PHP5 Installation........................................................................................................................................................ 22
phpMyAdmin........................................................................................................................................................................ 24
Debugging Message / Error Log ........................................................................................................................................... 25
Log MySQL Debugging Message........................................................................................................................................... 27
“Permission denied” Error when Uploading Files- PHP move_uploaded_file()................................................................. 28
Configure Maximum Size of Upload File.............................................................................................................................. 28
Error Happened When Missing “php” in Escape Mark <??>............................................................................................... 29
Datetime & Timezone........................................................................................................................................................... 29
Navicat Database Administration Tool.................................................................................................................................... 30
MySQL – How to Enable Remote Access?................................................................................................................................ 33
Use MySQL Workbench(MS-Windows) to Connect Remote MySQL Server .......................................................................... 36
PHP – How to View PHP Source Codes in Web Page............................................................................................................... 38
L.A.M.P Architecture
A kind of software bundle.
The acronym LAMP refers to first letters of the four components of a solution stack, composed entirely of free
and open-source software, suitable for building high-availability heavy-duty dynamic web sites, and capable of
serving tens of thousands of requests simultaneously.
http://upload.wikimedia.org/wikipedia/commons/thumb/8/82/LAMP_software_bundle.svg/600px-LAMP_software_bundle.svg.png
The meaning of the LAMP acronym depends on which specific components are used as part of the actual bundle:
* Linux, the operating system (i.e. not just the Linux kernel, but also glibc and some other essential components
of an operating system)
* Apache HTTP Server, the web server. Its daemon/service name is “httpd”.
* MySQL, MariaDB or MongoDB, the database management system
* PHP, Perl, or Python, the scripting languages (respectively programming languages) used for dynamic web
pages and web development.
Web server (Apache) and the application (written in PHP, Perl or Python) might be in the same process, but the
database is always a separate process.
P.S:
Web server could use PHP/Perl/Python as an integrated component(in the form of Module or Plug-in running in
the same memory space of web server) or a separate program (e.g CGI-way, use it by invoking interpreter(a
software)), so it says “might be in the same process”.
http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/LAMPP_Architecture.png/450px-LAMPP_Architecture.png
CentOS Envrionment Setup
Check the version number of CentOS:
$ cat /etc/centos-release
Add EPEL(Extra Package for Enterprise Linux)
[root] # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
[root] # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Add Remi repository. The Remi repository is a repository containing updated PHP and MySQL packages and is
maintained by Remi ( http://blog.famillecollet.com/pages/Config-en ).
[root] # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
Update package repository database.
[root] # yum -y update
List current YUM repositories.
[root] # yum repolist
Show Services be started on System Boot
$ chkconfig --list
Disable SELinux (Security-Enhanced Linux)
If SELinux makes for some cryptic errors when running the LAMP stack, you could follow steps to disable SELinux.
(1) Open SELinux configuration file using text editor
[root]# vim /etc/selinux/config
(2) Change the “SELINUX=” line to “disabled” value, like so:
SELINUX= disabled
(3) Reboot your machine
[root]# shutdown -r now
Apache 2 (2.2)
Apache2 is available as a CentOS package, therefore we can install it like this:
[root] # yum install httpd
Allow Apache server default port 80(or other port number you want) through your firewall/router if you want to
connect from remote systems. To do that, edit file /etc/sysconfig/iptables,
[root] # vi /etc/sysconfig/iptables
Add the following lines.
[...]
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[...]
Restart iptables:
[root] # service iptables restart
Now configure your system to start Apache at boot time...
[root] # chkconfig --levels 235 httpd on
... and start Apache:
[root] # /etc/init.d/httpd start
or
[root] # service httpd start
Now direct your browser to http://192.168.0.100 (or your host’s IP address), and you should see the Apache2
placeholder page:
Apache's default document root is /var/www/html on CentOS, and the configuration file is
/etc/httpd/conf/httpd.conf. Additional configurations are stored in the /etc/httpd/conf.d/ directory.
To use command to see the version of current Apache2 server
$ apachectl -v
or
$ httpd -v
Troubleshooting Apache(httpd)
Permission denied: make_sock: could not bind to address [::]:88 (88 is web server port
number)
In Apache, this type of error occurs at the time of starting the service after editing the
/etc/httpd/conf/httpd.conf file to listen to a particular port number.
[Root Cause]
The reason is that Apache allowing only specified http port numbers, and the one you have given is not in that list.
This could check by using semanage tool ( http://linux.die.net/man/8/semanage ).
[Solution]
Steps:
(1) Search which package contains semanage tool.
$ su
# yum provides /usr/sbin/semanage
(2) Install policycoreutils-python package.
$ su
# yum -y install policycoreutils-python
(3) Check installed semanage tool.
(4) Show current granted port numbers for Apach(http).
$ su
# semanage port -l|grep http
(4) Add wanted port numbers into granted port list for Apach (httpd).
$ su
# semanage port -a -t http_port_t -p tcp 8888
(5) Start Apache(httpd) again.
Use netstat tool to see if Apache(httpd) binded the port number you added before.
$ netstat -n -l -t -p
This command means :
Please show numberic(-n) listening(-l) port number of TCP(-t) protocol and show it corresponding
service/process(-p)
(6) Connect to http://localhost:8888 in web browser
Static File Access Forbidden (HTTP 403 Error)
From following example, a directory index web page, index.html, includes a JavaScript library file, b28n.js,under
subdirectory “lang”, e.g. /var/www/html/lang.
When accessing index.html web page, it will show HTTP 403 Forbidden error message.
[Solution]
[root]# sudo chown -R $USER:$USER /var/www/folder-name
[root]# sudo chmod -R 755 /var/www
Apache Log Files
In directory /etc/httpd/logs which is symbolically linked to /var/log/httpd.
There have two log files:
* access_log
* error_log
In Apache configuration file, /etc/httpd/conf/httpd.conf, variable “ErrorLog” denotes the file name for logging
access or error messages.
The files’path is relative to “/etc/httpd”
MySQL 5
To install MySQL, we do this:
[root] # yum install -y --enablerepo=remi,remi-test mysql mysql-server phpmyadmin
Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system
boots):
[root] # chkconfig --levels 235 mysqld on
and start the MySQL server:
[root] # /etc/init.d/mysqld start
or
[root] # service mysqld start
MySQL Installation Path
Show MySQL Version
$ mysql
or
$ mysqladmin version
Show Current Databases
MySQL Configuration File
/etc/my.cnf
MySQL Log File
/var/log/mysqld.log
Verify PhpMyAdmin
In web browser, connect http://localhost:YourPortNum/phpmyadmin/
Enable phpMyAdmin Remote Access
In phpMyAdmin’s configuration file, phpMyAdmin.conf, is in folder “/etc/httpd/conf.d/”.
In phpMyAdmin.conf, add allowed IP addresses to access remotely.
PHP 5
Install PHP5 and the Apache PHP5 module as follows:
[root] # yum install -y --enablerepo=remi,remi-test php php-common php-pecl-memcache php-imap
php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo
php-mysql
------------------------------------------------------------------------------------------------------------------------------------------------
Note:
MySQL (php-mysql) – A extension for PHP applications that use MySQL databases.
Memcache (php-pecl-memcache) – Memcached caching daemon.
Memcached (php-pecl-memcached) – Memcached caching daemon.
GD (php-gd) – GD extension for PHP application to serve graphics.
XML (php-xml) – XML Parser for PHP applications.
MBString (php-mbstring) – Mbstring extension is used to handle multi-byte string in PHP applications.
MCrypt (php-mcrypt) – A Mcrypt library for PHP scripts.
APC (php-pecl-apc) – APC module used to optimize and cache PHP code. It is a free and open PHP opcode cacher
for caching and optimizing PHP intermediate code. It's similar to other PHP opcode
cachers, such as eAccelerator and Xcache. It is strongly recommended to have one of these
installed to speed up your PHP page.
CLI (php-cli) – Command-line interface for PHP.
PEAR (php-pear) – Application Repository framework for PHP.
PDO (php-pdo) – Database access module for PHP applications.
------------------------------------------------------------------------------------------------------------------------------------------------
In Apache(httpd) configureation file, /etc/httpd/conf/httpd.conf, add below section for interpreting of PHP
codes
as following snapshot:
It must restart Apache afterwards:
[root] # /etc/init.d/httpd restart
or
[root] # service httpd restart
AddType application/x-httpd-php .php .htm .html .php3
PHP Configuration Files
Configure PHP
(1) Increase PHP script memory limit
In the /etc/php.ini file replace memory_limit = 16M with memory_limit = 128M
(2) Increase PHP script max execution time
In the /etc/php.ini file replace max_execution_time = 30 with max_execution_time = 120
(3) Increase PHP script max upload size
In the /etc/php.ini file replace post_max_size = 8M with post_max_size = 50M
Check PHP5 Installation
The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in
that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as
the installed PHP version.
$ vi /var/www/html/info.php
, add
Now we call that file in a browser (e.g. http://localhost/info.php):
<?php
phpinfo();
?>
As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If
you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there
which means we don't have MySQL support in PHP5 yet.
To use command line to see current version of PHP
$ php -v
phpMyAdmin
phpMyAdmin is a web interface through which you can manage your MySQL databases.
First we enable the RPMforge repository on our CentOS system as phpMyAdmin is NOT available in the official
CentOS 6.5 repositories.
Import the RPMforge GPG key:
[root] # rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
On x86_64 systems:
[root] # yum -y install
http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
On i386 systems:
[root] # yum -y install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
phpMyAdmin can now be installed as follows:
[root] # yum -y install phpmyadmin
ow we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections
not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):
[root] # vi /etc/httpd/conf.d/phpmyadmin.conf
Next we change the authentication in phpMyAdmin from cookie to http:
[root] # # cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php p
[root] # vi /usr/share/phpmyadmin/config.inc.php
Restart Apache:
[root] # /etc/init.d/httpd restart
Afterwards, you can access phpMyAdmin under http://192.168.0.100/phpmyadmin/.
Debugging Message / Error Log
Ref : http://www.w3schools.com/php/func_error_log.asp
http://www.php.net/manual/en/function.error-log.php
In PHP page, use “error_log(String, 0)” function to store your debugging message into Apache web server’s log
file, /etc/httpd/logs/error_log. The parameter “0” means that the error is logged to web server’s error log.
#
# Web application to manage MySQL
#
#<Directory "/usr/share/phpmyadmin">
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
To use error_log(), put the function as below snapshot.
After run the PHP web page including error_log() function, it could view messaged as below
$ cat /etc/httpd/logs/error_log
Other Error-Log relevant configurations in /etc/php.ini are as below:
Log MySQL Debugging Message
In “[mysql]” section of /etc/php.ini, set key “mysql.trace_mode” to “On”, it could.
Following is MySQL debugging message on PHP web page.
$ cat /var/logs/httpd/logs/error_log
“Permission denied” Error when Uploading Files- PHP
move_uploaded_file()
When doing HTTP upload file operation and move the uploaded file from web server temp folder to destination
folder using PHP move_uploaded_file() funtion, if it show “Permission denied” error and move_uploaded_file()
will return value 0.
[Solution]
Change the destination folder mode to 777.
For example,
# chmod 777 /var/www/html/firmware
Configure Maximum Size of Upload File
When using PHP function move_uploaded_file() to move uploaded file to designated destination, if it return
error value(-1), it might need to check the restriction of upload file’s size.
In PHP configuration file /etc/php.ini, check value of variable “upload_max_filesize” and see if the size of the file
to be uploaded is greater than variable’s value.
Also, you could change that value to a larger one.
Error Happened When Missing “php” in Escape Mark <??>
When writing PHP codes, if it forget to add “php” in escape mark <??> as below script(shown as below),
it will generate “Unexpected token <” error as below snapshot.
(This error message is shown in Google Chrome web browser’s Debugger)
Datetime & Timezone
Before using date() function to get formatted datetime value, it needs to set timezone for your locale.
Two ways to set timezone:
<Way - 1> PHP Configuration File
In /etc/php.ini , find section [Date]
, uncomment "date.timezone=", fill the timezone value and save file.
Finally, restart Apache server by the command:
$ service httpd restart
< Way - 2> Use date_default_timezone_set() Function
In PHP codes, before using date() function, to call function date_default_timezone_set() to set
timezone.
Ex:
Timezones supported in PHP are list here:
http://www.php.net/manual/en/timezones.php
<script language=”javascript”>
var id = < ? $MyID; ?>
</script>
Navicat Database Administration Tool
Official Site - http://www.navicat.com/cht/download/navicat-premium?gclid=CI-c46Whlr4CFQx9vQod774AWw
Import a MySQL Database
1.Right click connected MySQL server and select “新建數據庫新建數據庫新建數據庫新建數據庫”
2.Double click new created database, here “aps_fw” for example.
3. Right click the the opened database and select “運行運行運行運行 SQL 檔案檔案檔案檔案” and it will open file dialog.
4. In file dialog, navigate to the path to the MySQL file you want to run and click open
5. After importing successfully, click “關閉” button.
6. Reopen the database had done import operation.
MySQL – How to Enable Remote Access?
Or say - Enable Remote MySQL connection
$ mysql -u root -p mysql
[Solution]
Insert a record and the value of field Host is % character which means “Any IP Address”.
Steps:
(1) Connect to http://localhost/phpmyadmin , select table “user“ of database “mysql” and click “Export”.
(2) Click “Run(執行)” button to export.
(3) If you do NOT check “Save to /var/lib/phpMyAdmin/save” item, phpMyAdmin will just transfer the MySQL
script(.sql) file named in table name(here is “user”) you chosen to you.
(4) Open download MySQL script file with text editor and copy the SQL INSERT statement for “localhost” Host
and paste to the bottom in “Export Data of Table User” section and change the value of “Host” field of the copied
one to “%”.
(5) Click “Import(匯入匯入匯入匯入)” button to show Import form.
Choose the MySQL script file you want to use for import and click “Run(執行執行執行執行)” button to import.
(6) When data importing accomplished, verify the “user” table of database “mysql” that if there has a new
entry/record in which “Host” value is “%”.
Use MySQL Workbench(MS-Windows) to Connect
Remote MySQL Server
Click Plus sign button to show “Setup New Connection” form. Fill in fieds:
* Connection Name
* Connection Method
* Hostname
* Port
* Username
* Password - click button “Store in Vault” and fill MySQL server connection password in pop-out dialog
, and click “OK” button to finish.
Click “Test Connection” button to check if it could connect to remote MySQL server.
If it fail to connect, please verify if remote MySQL server grant remote access(as above steps) and if access
accout/password are correct.
Click “OK” button and the new connected remote MySQL server will shown as below.
PHP – How to View PHP Source Codes in Web Page
(1) Open Apache(httpd) configuration file, /etc/httpd/conf/httpd.conf
(2) Add below section
as following snapshot:
(3) Do symbolic link command of a .php file to .phps as below:
ln -s index.php index.phps
(4) Browse the .phps web page as below snapshot.
AddType application/x-httpd-php-source .phps

More Related Content

What's hot

Lamp configuration u buntu 10.04
Lamp configuration   u buntu 10.04Lamp configuration   u buntu 10.04
Lamp configuration u buntu 10.04mikehie
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentationrailsconf
 
How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7VCP Muthukrishna
 
Linux Basic Administration Commands Guide
Linux Basic Administration Commands GuideLinux Basic Administration Commands Guide
Linux Basic Administration Commands GuideVCP Muthukrishna
 
Free ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connectionFree ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connectionRustam Sariyev
 
Definitive guide to setting up a lamp server using open source software
Definitive guide to setting up a lamp server using open source softwareDefinitive guide to setting up a lamp server using open source software
Definitive guide to setting up a lamp server using open source softwareparves kamal
 
How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7VCP Muthukrishna
 
Installing Cacti openSUSE Leap 42.1
Installing Cacti openSUSE Leap 42.1Installing Cacti openSUSE Leap 42.1
Installing Cacti openSUSE Leap 42.1Didiet A. Pambudiono
 
Install cacti on open suse 13
Install cacti on open suse 13Install cacti on open suse 13
Install cacti on open suse 13Vanda KANY
 
How To Install and Configure Splunk on RHEL 7 in AWS
How To Install and Configure Splunk on RHEL 7 in AWSHow To Install and Configure Splunk on RHEL 7 in AWS
How To Install and Configure Splunk on RHEL 7 in AWSVCP Muthukrishna
 
How to Install Configure and Use sysstat utils on RHEL 7
How to Install Configure and Use sysstat utils on RHEL 7How to Install Configure and Use sysstat utils on RHEL 7
How to Install Configure and Use sysstat utils on RHEL 7VCP Muthukrishna
 
TFTP Installation Configuration Guide
TFTP Installation Configuration GuideTFTP Installation Configuration Guide
TFTP Installation Configuration GuideVCP Muthukrishna
 
How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7VCP Muthukrishna
 

What's hot (20)

Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9Installing lemp with ssl and varnish on Debian 9
Installing lemp with ssl and varnish on Debian 9
 
Lamp configuration u buntu 10.04
Lamp configuration   u buntu 10.04Lamp configuration   u buntu 10.04
Lamp configuration u buntu 10.04
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentation
 
Centos config
Centos configCentos config
Centos config
 
How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7How To Install and Configure SUDO on RHEL 7
How To Install and Configure SUDO on RHEL 7
 
Linux Basic Administration Commands Guide
Linux Basic Administration Commands GuideLinux Basic Administration Commands Guide
Linux Basic Administration Commands Guide
 
Free ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connectionFree ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connection
 
Definitive guide to setting up a lamp server using open source software
Definitive guide to setting up a lamp server using open source softwareDefinitive guide to setting up a lamp server using open source software
Definitive guide to setting up a lamp server using open source software
 
How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7
 
Installing Cacti openSUSE Leap 42.1
Installing Cacti openSUSE Leap 42.1Installing Cacti openSUSE Leap 42.1
Installing Cacti openSUSE Leap 42.1
 
Install cacti on open suse 13
Install cacti on open suse 13Install cacti on open suse 13
Install cacti on open suse 13
 
Yum (Linux)
Yum (Linux) Yum (Linux)
Yum (Linux)
 
How To Install and Configure Splunk on RHEL 7 in AWS
How To Install and Configure Splunk on RHEL 7 in AWSHow To Install and Configure Splunk on RHEL 7 in AWS
How To Install and Configure Splunk on RHEL 7 in AWS
 
Presentation1
Presentation1Presentation1
Presentation1
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
 
How to Install Configure and Use sysstat utils on RHEL 7
How to Install Configure and Use sysstat utils on RHEL 7How to Install Configure and Use sysstat utils on RHEL 7
How to Install Configure and Use sysstat utils on RHEL 7
 
9i lin relnotes
9i lin relnotes9i lin relnotes
9i lin relnotes
 
TFTP Installation Configuration Guide
TFTP Installation Configuration GuideTFTP Installation Configuration Guide
TFTP Installation Configuration Guide
 
How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7
 

Similar to L.A.M.P Installation Note --- CentOS 6.5

How To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWSHow To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWSVCP Muthukrishna
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceohadlevy
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by CapistranoTasawr Interactive
 
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253Sachin Jaypatre
 
Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Kaan Aslandağ
 
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8Raja Rozali Raja Hasan
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Joshua Harlow
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instancekamarul kawnayeen
 
Awstats installation
Awstats installationAwstats installation
Awstats installationmsaini542
 
Awstats installation
Awstats installationAwstats installation
Awstats installationmsaini542
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
Making Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixMaking Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixDiana Tkachenko
 
Systems Automation with Puppet
Systems Automation with PuppetSystems Automation with Puppet
Systems Automation with Puppetelliando dias
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleChanaka Lasantha
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manualjoseig23
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage ServiceQuick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage ServiceCloudian
 

Similar to L.A.M.P Installation Note --- CentOS 6.5 (20)

Apache - Quick reference guide
Apache - Quick reference guideApache - Quick reference guide
Apache - Quick reference guide
 
How To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWSHow To Configure Apache VirtualHost on RHEL 7 on AWS
How To Configure Apache VirtualHost on RHEL 7 on AWS
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conference
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
 
Network Manual
Network ManualNetwork Manual
Network Manual
 
Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8Configuration of Apache Web Server On CentOS 8
Configuration of Apache Web Server On CentOS 8
 
Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8Installing php 7.4 Nginx Laravel 7.x on Centos 8
Installing php 7.4 Nginx Laravel 7.x on Centos 8
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu InstanceInstalling Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
 
Awstats installation
Awstats installationAwstats installation
Awstats installation
 
Awstats installation
Awstats installationAwstats installation
Awstats installation
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Making Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch FixMaking Spinnaker Go @ Stitch Fix
Making Spinnaker Go @ Stitch Fix
 
Systems Automation with Puppet
Systems Automation with PuppetSystems Automation with Puppet
Systems Automation with Puppet
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
Cacoo enterprise installation_manual
Cacoo enterprise installation_manualCacoo enterprise installation_manual
Cacoo enterprise installation_manual
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage ServiceQuick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
 

More from William Lee

Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesWilliam Lee
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxWilliam Lee
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHPWilliam Lee
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 William Lee
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3William Lee
 
Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)William Lee
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerWilliam Lee
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCapWilliam Lee
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding WindowWilliam Lee
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserWilliam Lee
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserWilliam Lee
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASPWilliam Lee
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginWilliam Lee
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationWilliam Lee
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)William Lee
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web PageWilliam Lee
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 UsageWilliam Lee
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)William Lee
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBBWilliam Lee
 

More from William Lee (20)

Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3
 
Viewing Android Source Files in Eclipse (Chinese)
Viewing Android Source Files in Eclipse  (Chinese)Viewing Android Source Files in Eclipse  (Chinese)
Viewing Android Source Files in Eclipse (Chinese)
 
Usage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency WalkerUsage Note of Microsoft Dependency Walker
Usage Note of Microsoft Dependency Walker
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
Qt4 App - Sliding Window
Qt4 App - Sliding WindowQt4 App - Sliding Window
Qt4 App - Sliding Window
 
GTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App ChooserGTK+ 2.0 App - Desktop App Chooser
GTK+ 2.0 App - Desktop App Chooser
 
GTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon ChooserGTK+ 2.0 App - Icon Chooser
GTK+ 2.0 App - Icon Chooser
 
Note of CGI and ASP
Note of CGI and ASPNote of CGI and ASP
Note of CGI and ASP
 
Moblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) PluginMoblin2 - Window Manager(Mutter) Plugin
Moblin2 - Window Manager(Mutter) Plugin
 
MGCP Overview
MGCP OverviewMGCP Overview
MGCP Overview
 
Asterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log RotationAsterisk (IP-PBX) CDR Log Rotation
Asterisk (IP-PBX) CDR Log Rotation
 
C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)C Program Runs on Wrong Target Platform(CPU Architecture)
C Program Runs on Wrong Target Platform(CPU Architecture)
 
Internationalization(i18n) of Web Page
Internationalization(i18n) of Web PageInternationalization(i18n) of Web Page
Internationalization(i18n) of Web Page
 
Notes for SQLite3 Usage
Notes for SQLite3 UsageNotes for SQLite3 Usage
Notes for SQLite3 Usage
 
Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)Cygwin Install How-To (Chinese)
Cygwin Install How-To (Chinese)
 
Android Storage - StorageManager & OBB
Android Storage - StorageManager & OBBAndroid Storage - StorageManager & OBB
Android Storage - StorageManager & OBB
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

L.A.M.P Installation Note --- CentOS 6.5

  • 1. L.A.M.P Installation Note --- CentOS 6.5 William.L wiliwe@gmail.com 2014-05-02 (2014-07-18 updated)
  • 2. Index CentOS Envrionment Setup........................................................................................................................................................ 6 Show Services be started on System Boot............................................................................................................................. 7 Disable SELinux (Security-Enhanced Linux) ........................................................................................................................... 7 Apache 2 (2.2)............................................................................................................................................................................. 9 Troubleshooting Apache(httpd)........................................................................................................................................... 10 Permission denied: make_sock: could not bind to address [::]:88 (88 is web server port number)............................. 10 Static File Access Forbidden (HTTP 403 Error)................................................................................................................. 13 Apache Log Files.................................................................................................................................................................... 15 MySQL 5 .................................................................................................................................................................................... 17 MySQL Installation Path....................................................................................................................................................... 17 Show MySQL Version............................................................................................................................................................ 17 Show Current Databases...................................................................................................................................................... 18 MySQL Configuration File..................................................................................................................................................... 18 MySQL Log File...................................................................................................................................................................... 19 Verify PhpMyAdmin ............................................................................................................................................................. 19 Enable phpMyAdmin Remote Access .................................................................................................................................. 20 PHP 5......................................................................................................................................................................................... 21 PHP Configuration Files ........................................................................................................................................................ 22 Configure PHP....................................................................................................................................................................... 22 Check PHP5 Installation........................................................................................................................................................ 22 phpMyAdmin........................................................................................................................................................................ 24 Debugging Message / Error Log ........................................................................................................................................... 25 Log MySQL Debugging Message........................................................................................................................................... 27 “Permission denied” Error when Uploading Files- PHP move_uploaded_file()................................................................. 28 Configure Maximum Size of Upload File.............................................................................................................................. 28 Error Happened When Missing “php” in Escape Mark <??>............................................................................................... 29 Datetime & Timezone........................................................................................................................................................... 29 Navicat Database Administration Tool.................................................................................................................................... 30 MySQL – How to Enable Remote Access?................................................................................................................................ 33 Use MySQL Workbench(MS-Windows) to Connect Remote MySQL Server .......................................................................... 36
  • 3. PHP – How to View PHP Source Codes in Web Page............................................................................................................... 38
  • 4. L.A.M.P Architecture A kind of software bundle. The acronym LAMP refers to first letters of the four components of a solution stack, composed entirely of free and open-source software, suitable for building high-availability heavy-duty dynamic web sites, and capable of serving tens of thousands of requests simultaneously. http://upload.wikimedia.org/wikipedia/commons/thumb/8/82/LAMP_software_bundle.svg/600px-LAMP_software_bundle.svg.png The meaning of the LAMP acronym depends on which specific components are used as part of the actual bundle: * Linux, the operating system (i.e. not just the Linux kernel, but also glibc and some other essential components of an operating system) * Apache HTTP Server, the web server. Its daemon/service name is “httpd”. * MySQL, MariaDB or MongoDB, the database management system * PHP, Perl, or Python, the scripting languages (respectively programming languages) used for dynamic web pages and web development. Web server (Apache) and the application (written in PHP, Perl or Python) might be in the same process, but the database is always a separate process. P.S: Web server could use PHP/Perl/Python as an integrated component(in the form of Module or Plug-in running in the same memory space of web server) or a separate program (e.g CGI-way, use it by invoking interpreter(a software)), so it says “might be in the same process”.
  • 6. CentOS Envrionment Setup Check the version number of CentOS: $ cat /etc/centos-release Add EPEL(Extra Package for Enterprise Linux) [root] # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm [root] # rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm Add Remi repository. The Remi repository is a repository containing updated PHP and MySQL packages and is maintained by Remi ( http://blog.famillecollet.com/pages/Config-en ). [root] # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm Update package repository database. [root] # yum -y update List current YUM repositories. [root] # yum repolist
  • 7. Show Services be started on System Boot $ chkconfig --list Disable SELinux (Security-Enhanced Linux) If SELinux makes for some cryptic errors when running the LAMP stack, you could follow steps to disable SELinux. (1) Open SELinux configuration file using text editor [root]# vim /etc/selinux/config (2) Change the “SELINUX=” line to “disabled” value, like so: SELINUX= disabled
  • 8. (3) Reboot your machine [root]# shutdown -r now
  • 9. Apache 2 (2.2) Apache2 is available as a CentOS package, therefore we can install it like this: [root] # yum install httpd Allow Apache server default port 80(or other port number you want) through your firewall/router if you want to connect from remote systems. To do that, edit file /etc/sysconfig/iptables, [root] # vi /etc/sysconfig/iptables Add the following lines. [...] -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT [...] Restart iptables: [root] # service iptables restart Now configure your system to start Apache at boot time... [root] # chkconfig --levels 235 httpd on ... and start Apache: [root] # /etc/init.d/httpd start or [root] # service httpd start Now direct your browser to http://192.168.0.100 (or your host’s IP address), and you should see the Apache2 placeholder page:
  • 10. Apache's default document root is /var/www/html on CentOS, and the configuration file is /etc/httpd/conf/httpd.conf. Additional configurations are stored in the /etc/httpd/conf.d/ directory. To use command to see the version of current Apache2 server $ apachectl -v or $ httpd -v Troubleshooting Apache(httpd) Permission denied: make_sock: could not bind to address [::]:88 (88 is web server port number) In Apache, this type of error occurs at the time of starting the service after editing the /etc/httpd/conf/httpd.conf file to listen to a particular port number.
  • 11. [Root Cause] The reason is that Apache allowing only specified http port numbers, and the one you have given is not in that list. This could check by using semanage tool ( http://linux.die.net/man/8/semanage ). [Solution] Steps: (1) Search which package contains semanage tool. $ su # yum provides /usr/sbin/semanage (2) Install policycoreutils-python package. $ su # yum -y install policycoreutils-python
  • 12. (3) Check installed semanage tool. (4) Show current granted port numbers for Apach(http). $ su # semanage port -l|grep http (4) Add wanted port numbers into granted port list for Apach (httpd). $ su # semanage port -a -t http_port_t -p tcp 8888 (5) Start Apache(httpd) again. Use netstat tool to see if Apache(httpd) binded the port number you added before. $ netstat -n -l -t -p This command means : Please show numberic(-n) listening(-l) port number of TCP(-t) protocol and show it corresponding service/process(-p)
  • 13. (6) Connect to http://localhost:8888 in web browser Static File Access Forbidden (HTTP 403 Error) From following example, a directory index web page, index.html, includes a JavaScript library file, b28n.js,under subdirectory “lang”, e.g. /var/www/html/lang. When accessing index.html web page, it will show HTTP 403 Forbidden error message.
  • 14. [Solution] [root]# sudo chown -R $USER:$USER /var/www/folder-name [root]# sudo chmod -R 755 /var/www
  • 15. Apache Log Files In directory /etc/httpd/logs which is symbolically linked to /var/log/httpd. There have two log files: * access_log * error_log In Apache configuration file, /etc/httpd/conf/httpd.conf, variable “ErrorLog” denotes the file name for logging
  • 16. access or error messages. The files’path is relative to “/etc/httpd”
  • 17. MySQL 5 To install MySQL, we do this: [root] # yum install -y --enablerepo=remi,remi-test mysql mysql-server phpmyadmin Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots): [root] # chkconfig --levels 235 mysqld on and start the MySQL server: [root] # /etc/init.d/mysqld start or [root] # service mysqld start MySQL Installation Path Show MySQL Version $ mysql or
  • 18. $ mysqladmin version Show Current Databases MySQL Configuration File /etc/my.cnf
  • 19. MySQL Log File /var/log/mysqld.log Verify PhpMyAdmin In web browser, connect http://localhost:YourPortNum/phpmyadmin/
  • 20. Enable phpMyAdmin Remote Access In phpMyAdmin’s configuration file, phpMyAdmin.conf, is in folder “/etc/httpd/conf.d/”. In phpMyAdmin.conf, add allowed IP addresses to access remotely.
  • 21. PHP 5 Install PHP5 and the Apache PHP5 module as follows: [root] # yum install -y --enablerepo=remi,remi-test php php-common php-pecl-memcache php-imap php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo php-mysql ------------------------------------------------------------------------------------------------------------------------------------------------ Note: MySQL (php-mysql) – A extension for PHP applications that use MySQL databases. Memcache (php-pecl-memcache) – Memcached caching daemon. Memcached (php-pecl-memcached) – Memcached caching daemon. GD (php-gd) – GD extension for PHP application to serve graphics. XML (php-xml) – XML Parser for PHP applications. MBString (php-mbstring) – Mbstring extension is used to handle multi-byte string in PHP applications. MCrypt (php-mcrypt) – A Mcrypt library for PHP scripts. APC (php-pecl-apc) – APC module used to optimize and cache PHP code. It is a free and open PHP opcode cacher for caching and optimizing PHP intermediate code. It's similar to other PHP opcode cachers, such as eAccelerator and Xcache. It is strongly recommended to have one of these installed to speed up your PHP page. CLI (php-cli) – Command-line interface for PHP. PEAR (php-pear) – Application Repository framework for PHP. PDO (php-pdo) – Database access module for PHP applications. ------------------------------------------------------------------------------------------------------------------------------------------------ In Apache(httpd) configureation file, /etc/httpd/conf/httpd.conf, add below section for interpreting of PHP codes as following snapshot: It must restart Apache afterwards: [root] # /etc/init.d/httpd restart or [root] # service httpd restart AddType application/x-httpd-php .php .htm .html .php3
  • 22. PHP Configuration Files Configure PHP (1) Increase PHP script memory limit In the /etc/php.ini file replace memory_limit = 16M with memory_limit = 128M (2) Increase PHP script max execution time In the /etc/php.ini file replace max_execution_time = 30 with max_execution_time = 120 (3) Increase PHP script max upload size In the /etc/php.ini file replace post_max_size = 8M with post_max_size = 50M Check PHP5 Installation The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version. $ vi /var/www/html/info.php , add Now we call that file in a browser (e.g. http://localhost/info.php): <?php phpinfo(); ?>
  • 23.
  • 24. As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet. To use command line to see current version of PHP $ php -v phpMyAdmin phpMyAdmin is a web interface through which you can manage your MySQL databases. First we enable the RPMforge repository on our CentOS system as phpMyAdmin is NOT available in the official CentOS 6.5 repositories. Import the RPMforge GPG key: [root] # rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt On x86_64 systems: [root] # yum -y install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm On i386 systems:
  • 25. [root] # yum -y install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm phpMyAdmin can now be installed as follows: [root] # yum -y install phpmyadmin ow we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza): [root] # vi /etc/httpd/conf.d/phpmyadmin.conf Next we change the authentication in phpMyAdmin from cookie to http: [root] # # cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php p [root] # vi /usr/share/phpmyadmin/config.inc.php Restart Apache: [root] # /etc/init.d/httpd restart Afterwards, you can access phpMyAdmin under http://192.168.0.100/phpmyadmin/. Debugging Message / Error Log Ref : http://www.w3schools.com/php/func_error_log.asp http://www.php.net/manual/en/function.error-log.php In PHP page, use “error_log(String, 0)” function to store your debugging message into Apache web server’s log file, /etc/httpd/logs/error_log. The parameter “0” means that the error is logged to web server’s error log. # # Web application to manage MySQL # #<Directory "/usr/share/phpmyadmin"> # Order Deny,Allow # Deny from all # Allow from 127.0.0.1 #</Directory> Alias /phpmyadmin /usr/share/phpmyadmin Alias /phpMyAdmin /usr/share/phpmyadmin Alias /mysqladmin /usr/share/phpmyadmin [...] /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'http'; [...]
  • 26. To use error_log(), put the function as below snapshot. After run the PHP web page including error_log() function, it could view messaged as below $ cat /etc/httpd/logs/error_log Other Error-Log relevant configurations in /etc/php.ini are as below:
  • 27. Log MySQL Debugging Message In “[mysql]” section of /etc/php.ini, set key “mysql.trace_mode” to “On”, it could. Following is MySQL debugging message on PHP web page. $ cat /var/logs/httpd/logs/error_log
  • 28. “Permission denied” Error when Uploading Files- PHP move_uploaded_file() When doing HTTP upload file operation and move the uploaded file from web server temp folder to destination folder using PHP move_uploaded_file() funtion, if it show “Permission denied” error and move_uploaded_file() will return value 0. [Solution] Change the destination folder mode to 777. For example, # chmod 777 /var/www/html/firmware Configure Maximum Size of Upload File When using PHP function move_uploaded_file() to move uploaded file to designated destination, if it return error value(-1), it might need to check the restriction of upload file’s size. In PHP configuration file /etc/php.ini, check value of variable “upload_max_filesize” and see if the size of the file to be uploaded is greater than variable’s value. Also, you could change that value to a larger one.
  • 29. Error Happened When Missing “php” in Escape Mark <??> When writing PHP codes, if it forget to add “php” in escape mark <??> as below script(shown as below), it will generate “Unexpected token <” error as below snapshot. (This error message is shown in Google Chrome web browser’s Debugger) Datetime & Timezone Before using date() function to get formatted datetime value, it needs to set timezone for your locale. Two ways to set timezone: <Way - 1> PHP Configuration File In /etc/php.ini , find section [Date] , uncomment "date.timezone=", fill the timezone value and save file. Finally, restart Apache server by the command: $ service httpd restart < Way - 2> Use date_default_timezone_set() Function In PHP codes, before using date() function, to call function date_default_timezone_set() to set timezone. Ex: Timezones supported in PHP are list here: http://www.php.net/manual/en/timezones.php <script language=”javascript”> var id = < ? $MyID; ?> </script>
  • 30. Navicat Database Administration Tool Official Site - http://www.navicat.com/cht/download/navicat-premium?gclid=CI-c46Whlr4CFQx9vQod774AWw Import a MySQL Database 1.Right click connected MySQL server and select “新建數據庫新建數據庫新建數據庫新建數據庫” 2.Double click new created database, here “aps_fw” for example.
  • 31. 3. Right click the the opened database and select “運行運行運行運行 SQL 檔案檔案檔案檔案” and it will open file dialog. 4. In file dialog, navigate to the path to the MySQL file you want to run and click open
  • 32. 5. After importing successfully, click “關閉” button. 6. Reopen the database had done import operation.
  • 33. MySQL – How to Enable Remote Access? Or say - Enable Remote MySQL connection $ mysql -u root -p mysql [Solution] Insert a record and the value of field Host is % character which means “Any IP Address”. Steps: (1) Connect to http://localhost/phpmyadmin , select table “user“ of database “mysql” and click “Export”. (2) Click “Run(執行)” button to export.
  • 34. (3) If you do NOT check “Save to /var/lib/phpMyAdmin/save” item, phpMyAdmin will just transfer the MySQL script(.sql) file named in table name(here is “user”) you chosen to you. (4) Open download MySQL script file with text editor and copy the SQL INSERT statement for “localhost” Host and paste to the bottom in “Export Data of Table User” section and change the value of “Host” field of the copied one to “%”.
  • 35. (5) Click “Import(匯入匯入匯入匯入)” button to show Import form. Choose the MySQL script file you want to use for import and click “Run(執行執行執行執行)” button to import. (6) When data importing accomplished, verify the “user” table of database “mysql” that if there has a new entry/record in which “Host” value is “%”.
  • 36. Use MySQL Workbench(MS-Windows) to Connect Remote MySQL Server Click Plus sign button to show “Setup New Connection” form. Fill in fieds: * Connection Name * Connection Method * Hostname * Port * Username * Password - click button “Store in Vault” and fill MySQL server connection password in pop-out dialog , and click “OK” button to finish. Click “Test Connection” button to check if it could connect to remote MySQL server. If it fail to connect, please verify if remote MySQL server grant remote access(as above steps) and if access accout/password are correct.
  • 37. Click “OK” button and the new connected remote MySQL server will shown as below.
  • 38. PHP – How to View PHP Source Codes in Web Page (1) Open Apache(httpd) configuration file, /etc/httpd/conf/httpd.conf (2) Add below section as following snapshot: (3) Do symbolic link command of a .php file to .phps as below: ln -s index.php index.phps (4) Browse the .phps web page as below snapshot. AddType application/x-httpd-php-source .phps