Centos7 - Start your own website in 15 minutes

mar

bitcoin is freedom
Staff member
Joined
Jan 14, 2015
Messages
398
Points
28
Credits
56,331,933
Bronze Usergroup
Username Style
Here is a great video i found, it's great for beginners, it takes about 15 minutes and you can start your own website,

i use this before, if anyone needs help, let me know,

here is the video:

 
- yum install -y nano wget
- yum install -y httpd
- systemctl start httpd
- systemctl enable httpd
- yum install -y mariadb mariadb-server
- systemctl start mariadb
- systemctl enable mariadb
- mysql_secure_installation

set password
y,y,y,y,y

- yum install -y php php-mysql
- systemctl restart httpd
- wget http://prdownloads.sourceforge.net/webadmin/webmin-1.890-1.noarch.rpm
- yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect
- rpm -U webmin-1.890-1.noarch.rpm

- systemctl disable firewalld
- yum install -y iptables-services
- systemctl enable iptables
- nano /etc/sysconfig/iptables


add this under :OUTPUT ACCEPT [0:0]

-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT

then save it, ctrl+x


- systemctl restart iptables
 
afterwards configure mail(no need to add in ip tables)

nano -w -/etc/postfix/main.cf

edit and put own servers ip, will look like this
inet_interface = 192.168.0.103


inet_interface = 192.168.0.103


inet_protocols = ipv4

sudo apt-get install sendmail
chkconfig postfix on

postfix start
postfix stop

echo "test | mail -s "test mail" test@outlook.com

nano -w /var/log/maillog
cat maillog

restorecon -v /etc/postfix/main.cf
getsebool httpd_can_sendmail
getsebool httpd_can_sendmail
sudo setbool -P httpd_can_sendmail 1
sudo setsebool -P httpd_can_sendmail 1
 
add domain

change hostname, example: myserver.com

vi /etc/hostname


hosts file, example: 192.168.1.6 myserver.com localhost
vi /etc/hosts
 
Last edited:
Let's try again in 2023

Bare Centos 7

Code:
yum -y update

sudo yum install wget

wget http://prdownloads.sourceforge.net/webadmin/webmin-2.013-1.noarch.rpm

yum install "perl(Net::SSLeay)"
yum install "perl(Encode::Detect)"
yum install "perl(Data::Dumper)"
yum install "perl(Digest::SHA)"
yum install "perl(Digest::MD5)"

yum install unzip





rpm -U webmin-2.013-1.noarch.rpm

yum install webmin

service webmin start

chkconfig webmin on


https://YOUR-IP-ADDRESS:10000

source:
 
Last edited:
yum update

yum install perl-CGI perl-libwww-perl perl-DBI perl-DBD-MySQL perl-GD perl-Cache-Memcached perl-Digest-SHA perl-LWP-Protocol-https

sudo yum install firewalld
sudo systemctl start firewalld
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
sudo systemctl enable firewalld

sudo yum update httpd
sudo yum install httpd
sudo systemctl start httpd
sudo systemctl enable httpd

source:



upload files via filezilla

change owner and grp of files to apace
chown apache -R cgi-bin
chown apache -R htmln

chgrp apache -R cgi-bin
chgrp apache -R html



inside cgi-bin folder Chmod install_fs.cgi to 755 and run it in browser
chmod 755 -R install_fs.cgi

 
This all assumes that you have Apache 2.4 installed and are trying to install Certbot. Make sure A record is set to your IP address in DNS.

cd /etc/httpd/conf.d
sudo nano yourDomainName.conf


Paste, edit, and save the following:

<VirtualHost *:80>
ServerName yourDomainName.com
DocumentRoot /var/www/html
ServerAlias www.yourDomainName.com
ErrorLog /var/www/error.log
CustomLog /var/www/requests.log combined
</VirtualHost>


And with this you should see the virtual host:

httpd -D DUMP_VHOSTS



Source:
 
The Biggest Websites- The Biggest, Largest, Best, Most Popular Forums and Message Boards Top List on the Internet.

Number of visitors since November 2018: