CentOS installs the lamp environment with its own RPM package in the Yum source

Source: Internet
Author: User
Tags mysql login

CentOS installs the lamp environment using the RPM package that comes with the Yum source. This is the most basic and easiest way to install lamp under Linux. The Novice can be installed and used calmly.

1. Install the base package (optional installation)
Yum install-y wget zip unzip gzip
Yum install-y python Ruby Perl
Yum install-y GC GCC gcc-c++

2. Installing PHP and its related components
Yum install-y php php-gd
Yum install-y php-mbstring php-mcrypt php-mysql php-pdo

3. Start the HTTPD server
Service httpd Start
Chkconfig httpd on set boot auto start
Server www directory address/var/www/html/

4. Install MySQL
Yum install-y MySQL Mysql-server
[[Email protected] html]# service mysqld start

5. Configure MySQL
Run as prompted
/usr/bin/mysql_secure_installation
Follow the prompts to configure MySQL, including root password settings, and so on.
Chkconfig mysqld on set boot auto start

6. Installing phpMyAdmin
Download phpMyAdmin corresponding version https://www.phpmyadmin.net/files/
Copy the zip package to the/var/www/html/directory and extract the name to phpMyAdmin
For example:
wget Https://files.phpmyadmin.net/phpMyAdmin/3.5.8.2/phpMyAdmin-3.5.8.2-all-languages.zip
Unzip phpmyadmin-3.5.8.2-all-languages.zip-d/var/www/html/
Mv/var/www/html/phpmyadmin-3.5.8.2-all-languages/var/www/html/phpmyadmin
Access to http://youripaddress/phpmyadmin/can be based on 5. Configure the root password set in MySQL login

7. Firewall issues
Common ports such as 22,80 are turned on by default when you purchase a server that is normally mirrored.
When installing CentOS yourself to a specific machine or VMware virtual machine installation, there may be an issue where iptables is not configured to cause 80 ports to be inaccessible.
Method of temporarily disabling Iptables (fails after restarting the machine), using the command service iptables stop
Never do this in a production environment!

---------------------------------------------------
The first run of service mysqld start will have the following tips, which are recorded here for later viewing,
It is of vital importance to repair database problems!!
Initializing mysql database:installing mysql system tables ...
Ok
Filling Help Tables ...
Ok

To start mysqld at boot time with to copy
Support-files/mysql.server to the right place for your system

REMEMBER to SET A PASSWORD for the MySQL root USER!
To does so, start the server, then issue the following commands:

/usr/bin/mysqladmin-u root password ' new-password '
/usr/bin/mysqladmin-u root-h localhost.localdomain password ' new-password '

Alternatively you can run:
/usr/bin/mysql_secure_installation

Which would also give you the option of removing the test
Databases and anonymous user created by default. This is
Strongly recommended for production servers.

See the Manual for more instructions.

You can start the MySQL daemon with:
CD/USR; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
Cd/usr/mysql-test; Perl mysql-test-run.pl

Problems with The/usr/bin/mysqlbug script!

[OK]
Starting mysqld: [OK]




CentOS installs the lamp environment with its own RPM package in the Yum source

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.