Download RPM package from yum repository

To download RPM file from yum repo, you need to install yum-utils package.

Now you can use command

Example

This will download and store all rpm files in /var/yum folder. –resolve will resolve dependency and download them. This will be helpful if you need to install a package on a system with no direct internet connection.

See yum

Setup Tor Hidden Service on CentOS 7

Tor is provided by EPEL repository on CentOS 7. Install EPEL repo with command

Install tor

Edit tor config file

Uncomment or add following lines

Restart tor with command

Now your tor hidden service is ready to use. You need to run your web application on 127.0.0.1:80

To see URL of your tor hidden service, run

Make sure to make a backup of folder “/var/lib/tor/hidden_service/” as it comtains keys for this .onion domain. If you lost it, you will lose your domain name. So it is very important you keep the files safe.

To stop/start tor, run

See tor

CentOS add IP Address

To add IP address on a Linux server, first find name of your network interface. This can be done with command

In most case, it can be enp3s0 or eth0, if you have more than one network card, this may be differnt, in such case, you need to identify which network interface you need to configure the the IP address .

Now create file

Here i used enp3s0 as network inferface name, replace it with whatever network interface name you use.

Add following content

IP_ADDR_HERE = replace with the IP address you need to add.

enp3s0 = replace with actual network interface name.

Restart network service with command

If you need to add another IP, create file with name

for example “enp3s0:2”, you need to use same alias name in DEVICE entry (first line) in the file.

Adding IP Range in CentOS 6

Transmission web client

Install Transmission on CentOS

transmission is a torrent client. This come with a web GUI, that make it easy to installed on a remote server with no X-Windows. To install transmission on CentOS server, run

Allow Web Access

To access transmission web GUI, you need to white list your IP address. To do this, first stop tranmission

Edit file

Find

Replace with

YOUR_IP_ADDR_HERE – replace with your actual IP address.

Start transmission

You will be able to access web GUI at

Downloaded files are stored in folder

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

Allow System Accounts to login

Find

Replace With

Find

Replace with

Add

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