Install MongoDB 4.0 on CentOS 7

To install MongoDB 4.0 (for other versions, see release note) on CentOS 7, create file

Add content

Install MongoDB with

Enable MongoDB start on boot

Start Mongo DB with

To see mongoDB version, run

To see if mongoDB running

Or use

Install vsftpd on CentOS

To install vsftpd FTP server in CentOS, run

Enable vsftpd to start on boot

Edit configuration file

You need to update/add following configuration options

Restart vsftpd

See vsftpd

SELinux

To disable SELinux, edit

Now you need to reboot. If you don’t want to reboot, disable it for current session with

If you use SELinux, you may need to configure it for each applications.

For web server

webmin create new admin user from command line

webmin

PAM authentication failed n a webmin server with no errors on CentOS 6 server. To fix this, i created a nom PAM user “admin”.

To add non PAM user, edit

Add

Edit file

Add

Set a password for user admin.

Now you will be able to login to webmin at

Install CentOS Web Panel (CWP)

CentOS Web Panel (CWP) is a free hosting control panel for CentOS servers.

CentOS Web Panel

To install CentOS Web Panel, run

CWP use same Ports as popular Cpanel control panel.

Admin Panel

CWP Admin Panel available on following URL.

You can login with system user “root” and its password.

User Panel

Webmail

On CWP server, you can find MySQL login details in following config files.

Document Root

Web site files are stored in folder /home/USER/public_html

Stop/Start Services

Service files are stored in /usr/lib/systemd/system/

Web Server

CWP support multiple web servers. For Apache, it is installed in folder

Apache config file is /usr/local/apache/conf.d/vhosts.conf

CPW have its own apache package with name “cwp-httpd”, don’t use default httpd package provided by CentOS.

CWP server log can be found at

See Hosting Control Panel

Fix yum duplicate packages

On a CentOS server, when running

It failed with following error

https://gist.github.com/serverok/c0853120baff8848054cfb598e389c3a

This is because previous “yum update” failed for some reason after package install. So no cleanup was done.

To fix, you need to use package-cleanup command.

To list all duplicate packages, run

To remove all duplicate packages, run

Now do a yum update

This will update your system and install any missing packages.

To verify if there any problem, run

CentOS 7 Apache use PHP-FPM

Install PHP-FPM with command

Edit www.conf

Find

Replace with

Find

Replace with

Edit php.conf

Add

Restart Apache/php-fpm

Method 2

Here is php-fpm config using proxy_fcgi

https://gist.github.com/serverok/3d2e43bb951ded9a42ce8bc0c2c3b627

Enable UI in CSF Firewall on CentOS

CSF Firewall UI

CSF Firewall come with standalone UI. This is disabled by default. On CentOS, install following requirments

Edit CSF configuration file

Find

Replace with

Change following settins as needed.

By Default, only whitelisted IP can access the UI, to white list your IP, run

If you want to allow CSF UI from all IP address, then set UI_ALLOW to 0 in csf.conf

CSF use a self signed SSL, if you have an SSL cert, you can use it. SSL certificate is avaiable in folder

To use LetsEncrypt Free SSL certificate for CSF UI, i set symlink to ssl cert.

Now restart CSF and LDF

You will see CSF UI running on port 6666.