yum update && yum upgrade (Optional)- sudo yum -y install httpd
Jika terjadi masalah, update terlebih dahulu dengan perintah (diatas) > sudo yum -y update sudo firewall-cmd --permanent --zone=public --add-service=http sudo firewall-cmd --permanent --zone=public --add-service=https sudo firewall-cmd --reload- sudo systemctl start httpd
sudo systemctl enable httpd - vi /etc/yum.repos.d/MariaDB.repo
SOURCE > https://downloads.mariadb.org/mariadb/repositories/#mirror=surabaya&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.1 - sudo yum -y install MariaDB-server MariaDB-client
sudo systemctl start mariadb
sudo systemctl enable mariadb - sudo mysql_secure_installation
- Install PHP { Uninstall; yum remove php*
- yum install -y wget ; yum search php ; yum -y install yum-utils
- Install Default Repo :
yum install php php-mysql - SOURCE OK >; https://webtatic.com/packages/php70/
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
PHP 7.0
yum install php70w php70w-opcache
PHP 7.1
(Source > https://www.vultr.com/docs/how-to-install-php-7-x-on-centos-7)
sudo yum install -y mod_php71w php71w-cli php71w-common php71w-gdphp71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-xml
JIKA UPGRADE
yum install yum-plugin-replace
yum replace php-common --replace-with=php70w-common
Jika web php blank page, Install phpMyadmin - sudo yum -y install phpmyadmin
Jika terjadi masalah, update epel-release terlebih dahulu dengan perintah > sudo yum -y install epel-release - vi /etc/httpd/conf/httpd.conf
And Change “AllowOverride None“.
Options FollowSymLinks
AllowOverride None
To “AllowOverride All“.
Options FollowSymLinks
AllowOverride All - nano /etc/httpd/conf.d/phpMyAdmin.conf
# Apache 2.4
Require ip 127.0.0.1
Require ip ::1
Require ip 192.168.1.0/24
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
Allow from 192.168.1.0/24
ATAU: # AddDefaultCharset UTF-8
# # Apache 2.4
# Require ip 127.0.0.1
# Require ip ::1
#
# # Apache 2.2
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from ::1
#
Require all granted
- yum install php-cli
- 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 - mv /etc/my.cnf /etc/my.bak
cp /usr/share/mysql/my-large.cnf /etc/my.cnf - groupadd sharing
adduser omrin
usermod -aG sharing omrin
passwd omrin
mkdir /data-share
chown root.sharing /data-share
chmod 2775 /data-share
yum -y install samba samba-client - systemctl enable smb.service
systemctl enable nmb.service - firewall-cmd --permanent --add-service=samba
firewall-cmd --permanent --add-service=samba-client - systemctl restart firewalld.service
- nano /etc/samba/smb.conf
#TAMBAHKAN
[Data_Share]
path = /data-share
browseable = yes
writeable = yes
create mask = 2775
force create mode = 2775
directory mask = 2775
force create mode = 2775
valid users = @sharing
smbpasswd -a omrin
systemctl restart smb
ls -Z / | grep data-share
PEMBUATAN USER SAMBA
adduser omrin
passwd omrin
usermod -aG sharing omrin
smbpasswd -a omrin
HAPUS USER SAMBA
pdbedit -x -u username - [root@linuxjak]# userdel username
namun perintah diatas hanya akan menghapus user jack dari file /etc/passwd, /etc/group, /etc/shadow tidak menghapus home direktorinya
bila ingin home direktorinya terhapus beserta dengan spool email nya juga tambahkan opsi -r pada perintah userdel
[root@linuxjak]# userdel -r username
- passwd -l username //lock username
- passwd -u username //unloc username
nmtui
yum remove mysql mysql-server
yum autoremove mysql
yum autocelan mysql
mv /var/lib/mysql /var/lib/mysql_old_backup
cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php
vi /usr/share/phpMyAdmin/config.inc.php
sudo nano /etc/selinux/config
Change the line from SELINUX=enforcing to SELINUX=disabled.
Change Zone
sudo mv /etc/localtime /etc/localtime.old
sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime
# Kembali ke Default
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime
Change Time
date +%T -s "18:51:17"
18:51:17
Install SSH
yum install ssh
EDIT SSH
sudo nano /etc/ssh/sshd_config
Cari dan ganti teks 'PermitRootLogin without-password' dengan 'PermitRootLogin yes
sudo service ssh restart
Tidak ada komentar:
Posting Komentar
Harap Isi Komentar Anda...!