Linux Assesment - samuel-richardson/Sam-Tech-Journal GitHub Wiki
- Navigate to /etc/sysonfig/network-scripts.
- Edit ifcfg-interfacename(this is ens192 in the centos VM). Change or add the following fields as specified.
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.0.4.11(New address for linux box)
PREFIX=24(Subnet)
GATEWAY=10.0.4.2(ip of gateway FW)
DNS1=10.0.4.6(ip of DNS server)
DOMAIN=samuel.local(The domain name sent up earlier.)
- Restart network
systemctl restart network
Change Host Name
hostnamectl set-hostname my.new-hostname
Join a domain with linux
- Install realmd
sudo yum install -y realmd samba samba-common oddjob oddjob-mkhomedir sssd - Join the domain
realm join [email protected] yourdomain.local realm list- Test if join worked via ssh username@domain@linuxmachine
- Check if the new machine is in ad users and computers.
Install and run Wordpress
Install Apache
- Install Apache
yum install -y httpd
Install mariadb
- Install MySQL
yum -y install mariadb-server - Start mariadb
mysql -u root - Make DB
CREATE DATABASE wordpress; - Make User
CREATE USER adminuser@localhost IDENTIFIED BY 'password'; - Give USer Permissions
GRANT ALL PRIVILEGES ON wordpress.* TO adminuser@localhost IDENTIFIED BY 'password'; FLUSH PRIVILEGES;
Install PHP
yum install -y epel-releaseyum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpmyum install -y yum-utilsyum-config-manager --enable remi-php72yum updateyum install -y php72yum install -y mysqlnd
Install Wordpress
- download Wordpress
cd ~ wget http://wordpress.org/latest.tar.gz - Extract
tar -xzvf latest.tar.gz - Link Wordpress to var/www
rsync -avP ~/wordpress/ /var/www/html/ mkdir /var/www/html/wp-content/uploadschown -R apache:apache /var/www/html/*cd /var/www/htmlcp wp-config-sample.php wp-config.php- Update with dbname, username and password
vim wp-config.php