Today : | at : | Safemode : ON
>[+] WELCOME [+]
Title Author Perms Modified Category

TLBB Cài Apache, MySQL, PHP Unknown rwxr-xr-x 7:34:00 PM

Title TLBB Cài Apache, MySQL, PHP
Permission rw-r--r--
Author Unknown
Date and Time 7:34:00 PM
Category
Share
1. Cài đặt Apache Server:
sudo apt-get install apache2

2. Cài đặt MySQL Server:
Lệnh cài mysql:
sudo apt-get install -y mysql-server mysql-client --fix-missing --fix-broken
yum install mysql-server mysql
Lệnh tắt Firewall
ufw disable
/etc/sysconfig/selinux
Ở dòng SELINUX=enforcing bạn chuyển thành SELINUX=disabled
/etc/rc.d/init.d/iptables stop : ngừng dịch vụ iptables
chkconfig iptables off : không cho dịch vụ iptables (IPv4) khởi động cùng hệ thống
chkconfig ip6tables off :không cho dịch vụ iptables (IPv6) khởi động cùng hệ thống
mysql -u root -p
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY '123456';
nano /etc/mysql/my.conf
[mysqld]
datadir=/var/lib/mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/lib/mysql/mysql.sock
user = mysql
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
#bind-address = 192.168.1.3
key_buffer = 500M
table_cache = 4000
sort_buffer_size = 3M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
max_connections = 400
query_cache_type = 1
query_cache_limit = 5M
query_cache_size = 500M
tmp_table_size=20M
max_heap_table_size=20M
thread_cache_size = 64
service mysql restart
Auto start Mysql
sudo update-rc.d mysql defaults

3. Cài đặt PHP 5:
sudo apt-get install php5 libapache2-mod-php5
If you are using Apache 2.4
You have to check allow and deny rules
Check out http://httpd.apache.org/docs/2.4/upgrading.html#access
In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy.
In 2.4, such access control is done in the same way as other authorization checks, using the new module mod_authz_host.
The new directive is Require:
2.2 configuration:
Order allow,deny Allow from all
2.4 configuration:
Require all granted
Also don't forget to restart the apache server after these changes (# service httpd restart)


sudo a2enmod rewrite
sudo service apache2 restart

Powered by Blogger.