INSTALASI DAN KONFIGURASI LINUX CENTOS7

in komputer •  7 years ago 

12.pngKONFIGURASI IP ADDRESS
Daftar Perintah:

nmtui
systemctl status network
systemctl restart network

2.UPDATE CENTOS
Daftar Perintah:

yum update

3.INSTALL REPO EPEL
Daftar Perintah:

yum install -y epel-release
yum repolist
yum --disablerepo="*" --enablerepo="epel" list available

4.INSTALL APACHE & PHP
Daftar Perintah:

yum install -y httpd
systemctl start httpd
systemctl enable httpd
yum -y install php php-mysql php-devel php-gd php-pecl-memcache php-xmlrpc php-xml php-mbstring php-mcrypt
systemctl restart httpd

cp /etc/php.ini /etc/php.ini.backup
vi /etc/php.ini
cari:
;date.timezone=
rubah menjadi:
date.timezone=Asia/Jakarta

cari:
upload_max_filesize = 2M
rubah menjadi:
upload_max_filesize = 10M

cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backup
vi /etc/httpd/conf/httpd.conf
cari:

#...... dll
#...... dll
AllowOverride None

rubah menjadi:
AllowOverride All

systemctl restart httpd

5.INSTAL DATABASE
Daftar Perintah:

yum -y install mariadb-server mariadb
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
Enter current password for root (enter for none):
Change the root password? [Y/n] y (isi dengan password yang diberikan)
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
systemctl restart mariadb

cp /etc/my.cnf /etc/my.cnf.backup
vi /etc/my.cnf
Tambahkan:
big-tables
max_allowed_packet = 1G
innodb_file_per_table = 1

systemctl restart mariadb

6.KONFIGURASI SSH
Daftar Perintah:

systemctl status sshd
systemctl start sshd
systemctl enable sshd

7.FIREWALL
Daftar Perintah:

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --permanent --zone=public --add-service=mysql
firewall-cmd --permanent --zone=public --add-service=ssh
firewall-cmd --reload

8.SELINUX
Daftar Perintah:

cp /etc/sysconfig/selinux /etc/sysconfig/selinux.backup
vi /etc/sysconfig/selinux
SELINUX=disabled
reboot

###OPTIONAL

1.MERUBAH DEFAULT EDITOR PADA CENTOS
Daftar Perintah:

yum -y install nano
cd /usr/bin/
ln -s nano pico
export EDITOR="pico"

2.INSTALL WEBMIN
Daftar Perintah:

yum -y install wget
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.760-1.noarch.rpm
yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty
rpm -U webmin-1.760-1.noarch.rpm

3.MYSQL TUNNER
Daftar Perintah

wget http://mysqltuner.pl/ -O mysqltuner.pl
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
chmod +x mysqltuner.pl
perl mysqltuner.pl

4.repository lokal

backup repo asli
mkdir /etc/yum.repos.d/backup
mv -v /etc/yum.repos.d/* /etc/yum.repos.d/backup/

bikin file lokal.repo dalam folder /etc/yum.repos.d/
vi /etc/yum.repos.d/lokal.repo

isikan kemudian simpan
[lokalrepo]
name = repositori lokal centos 7
baseurl = http:///192.168.50.146/repolokal/
enabled=1
gpgcheck=0

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!