ตรวจสอบที่
1. ตรวจสอบที่ กลุ่ม Lab
2. ถ้าเป็นราย ITeme ให้ตรวจสอบเป็นราย Itemp ที่รายการ Lab
3.
| Tutorial details | |
|---|---|
| Difficulty | Easy (rss) |
| Root privileges | Yes |
| Requirements | CentOS/RHEL v7.x |
| Estimated completion time | 20m |
Loaded plugins: amazon-id, rhui-lb Resolving Dependencies --> Running transaction check ---> Package httpd.x86_64 0:2.4.6-17.el7 will be installed --> Processing Dependency: httpd-tools = 2.4.6-17.el7 for package: httpd-2.4.6-17.el7.x86_64 --> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-17.el7.x86_64 --> Running transaction check ---> Package httpd-tools.x86_64 0:2.4.6-17.el7 will be installed ---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================== Package Arch Version Repository Size ====================================================================================================== Installing: httpd x86_64 2.4.6-17.el7 rhui-REGION-rhel-server-releases 1.2 M Installing for dependencies: httpd-tools x86_64 2.4.6-17.el7 rhui-REGION-rhel-server-releases 77 k mailcap noarch 2.1.41-2.el7 rhui-REGION-rhel-server-releases 31 k Transaction Summary ====================================================================================================== Install 1 Package (+2 Dependent packages) Total download size: 1.3 M Installed size: 3.9 M Is this ok [y/d/N]: y Downloading packages: (1/3): httpd-tools-2.4.6-17.el7.x86_64.rpm | 77 kB 00:00:00 (2/3): httpd-2.4.6-17.el7.x86_64.rpm | 1.2 MB 00:00:00 (3/3): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00 ------------------------------------------------------------------------------------------------------ Total 2.0 MB/s | 1.3 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : httpd-tools-2.4.6-17.el7.x86_64 1/3 Installing : mailcap-2.1.41-2.el7.noarch 2/3 Installing : httpd-2.4.6-17.el7.x86_64 3/3 Verifying : mailcap-2.1.41-2.el7.noarch 1/3 Verifying : httpd-tools-2.4.6-17.el7.x86_64 2/3 Verifying : httpd-2.4.6-17.el7.x86_64 3/3 Installed: httpd.x86_64 0:2.4.6-17.el7 Dependency Installed: httpd-tools.x86_64 0:2.4.6-17.el7 mailcap.noarch 0:2.1.41-2.el7 Complete!
sudo systemctl enable httpd.serviceln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
sudo systemctl disable httpd.servicerm '/etc/systemd/system/multi-user.target.wants/httpd.service'
sudo systemctl start httpd.servicesudo systemctl stop httpd.servicesudo systemctl restart httpd.servicesystemctl is-active httpd.serviceactive
sudo apachectl gracefulsudo apachectl configtestSyntax OK
sudo yum install mariadb-server mariadbsudo systemctl start mariadb.servicesudo systemctl enable mariadb.serviceln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'
sudo systemctl stop mariadb.service #<-- Stop mariadb server sudo systemctl restart mariadb.service #<-- Restart mariadb server sudo systemctl disable mariadb.service #<-- Disable mariadb server sudo systemctl is-active mariadb.service #<-- Is mariadb server running?
sudo /usr/bin/mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): PRESS-ENTER-KEY
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password: YOUR-NEW-PASSWORD-HERE
Re-enter new password: YOUR-NEW-PASSWORD-HERE
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
mysql -u root -psudo yum install php php-mysql php-gd php-pearsudo systemctl restart httpd.servicesudo yum search php-php-cli.x86_64 : Command-line interface for PHP php-common.x86_64 : Common files for PHP php-gd.x86_64 : A module for PHP applications for using the gd graphics library php-ldap.x86_64 : A module for PHP applications that use LDAP php-mysql.x86_64 : A module for PHP applications that use MySQL databases php-odbc.x86_64 : A module for PHP applications that use ODBC databases php-pdo.x86_64 : A database access abstraction module for PHP applications php-pear.noarch : PHP Extension and Application Repository framework php-pecl-memcache.x86_64 : Extension to work with the Memcached caching daemon php-pgsql.x86_64 : A PostgreSQL database module for PHP php-process.x86_64 : Modules for PHP script using system process interfaces php-recode.x86_64 : A module for PHP applications for using the recode library php-soap.x86_64 : A module for PHP applications that use the SOAP protocol php-xml.x86_64 : A module for PHP applications which use XML php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
sudo yum info php-pgsqlsudo yum install php-pgsqlsudo vi /var/www/html/test.php<?php phpinfo(INFO_GENERAL); ?>
http://10.41.143.156/test.php
MySQL-client-percona-5.5.xx-x.rhel6.x64_i86.rpm
MySQL-shared-percona-5.5.xx-x.rhel6.x64_i86.rpm
MySQL-server-percona-5.5.xx-x.rhel6.x64_i86.rpm