Configure CUPS Printing Server on CentOS

Configure CUPS Printing on CentOS

when you need to setup a CentOS Linux print server, CUPS (Common UNIX Printing System)to the rescue!

login to your server, and su to root.

1- Install CUPS

yum install cups

2- Install dependency

yum install ghostscript.x86_64 hplip-common.x86_64

3-start the cups service, and then set to to run on startup

service cups start
chkconfig cups on

to best administer CUPS we need to configure the web GUI

vim /etc/cups/cupsd.conf

add the following line to the top (this allows easy administration)

DefaultEncryption Never

safelist your network to allow access

download

–obviously you want to enter the IP of the server here, rather than what i have,

now allow your local subnet to have access to the web GUI

download (1)

that’s just for the web access, but for the ADMIN pages, you may want to lock it down further:

download (2)

save + quit after all configured

also make sure to allow the port through IPtables (if enabled)

restart the cups service once completed

download (4)

browse to https://serverip:631

download (5)

That is all

Continue Reading

HOW TO INSTALL VESTA CP

Step 1 – First, login to your server’s shell via SSH as root, as always, for this task I use putty.

2013-12-23_154432

Step 2 – Next, download VestaCP installation script using curl command:

curl -O http://vestacp.com/pub/vst-install.sh

download-vestacp-620x195

Step 3 – Next, issue this magic command to start installing VestaCP:

bash vst-install.sh

4

Step 4 – The installer asks to confirm disabling SELinux and start the install process. Type Y and hit Enter.
Step 5 – The installer also asks to enter valid email address. So type your valid email address and double-check it to make sure your email is correct because VestaCP will also send your admin password there.

5

Step 6 – Once you hit Enter on your keyboard, the installer starts. Sit tight and wait for the installerto process and finish its job.
Step 7 – As long as you found no fatal error, the installer should finish quicker and you will see something like this on your screen:

7

You can also check your mailbox just to ensure the password is delivered and mail server (Exim) works properly on your server.

8

Step 8 – Now open up your favorite browser and login to VestaCP web-based UI using your VPS IP at port 8083.

https://xxx.xxx.xxx.xxx:2083/
Login as admin and use given password,
As you may also aware that the link is https:// which means via secure connection (SSL) so you may have to add / confirm exception on your browser.

vestacp-login

Voila! You should now see the main UI of Vesta hosting control panel.

vestacp-main-ui-620x242*click on image to view larger size.
Congratulation! You now have Vesta CP installed and a ready-to-use VPS to host all your websites.

Continue Reading

How to install MailServer Zimbra on Centos 7

Disabled SELINUX

# vim /etc/sysconfig/selinux

Change enforcing to disabled :

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Stop any MTA services installed in the server

# systemctl stop postfix
# systemctl disable postfix
# systemctl stop sendmail
# systemctl disable sendmail

Update the OS

# yum update -y

Install the required packages and libraries by issuing the following command :

#yum install perl perl-core ntpl nmap sudo libidn gmp libaio libstdc++ unzip sysstat sqlite -y

Extract the downloaded tar file :

Using the following command you can extract the tar file, We downloaded in previous step

wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz
tar xzf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz

Go to extracted ZCS Open Source Edition :

cd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110

Instal Zimbra.

./install.sh
Continue Reading

Install and configure an FTP server in CentOS 7.

With the open end we will follow the steps. First baixaremos the required packages . For this type :

# yum update vsf*

We’ll be getting new updates packages only FTP service, which in Linux is known as vsftpd .
Made the update will go to the next step , which is the installation of the FTP service. For this type :

# yum install vsftpd

To appear like the screen below , press the Y button to accept and continue the installation.
After installation we will have to start the FTP service. For this type :

Centos 6:

# service vsftpd start

Centos 7 :

#systemctl start vsftpd

Ready , installed and started the FTP service. Now we can perform tests to see the operation of the service. It’s time to create a username and password to connect to your FTP server , for this type :

useradd

Example:

# useradd test

Let’s create the password for the user. which in my case is test :

# passwd test

You will be asked for you to enter a password and click on you are asked to repeat the password. After that, we have created the username and password released to access the FTP server.

Now we switch to the user created . For this type primarily the following command to log in as user test :

# su - test

Create a folder within this user :

# mkdir Softwares

Remember that Linux is case sensitive, so if you type the first letter capitalized , remember to type correctly later.
Okay, now we need to know the number of IP address that is on your computer in order to make the FTP connection.

Continue Reading

CentOS 7 / RHEL 7 : Reset / Recover forgotten root password

In this post we will learn, how to reset / recover forgotten root password on CentOS 7 / RHEL 7 (Red Hat Enterprise Linux 7). On RHEL 5/6 or CentOS 5/6 series , the method of resetting forgotten root password was same. In latest RHEL 7 / CentOS 7 this time we have found some difference in steps to reset the forgotten root password.

Earlier, root password were used to recover from runlevel in case the boot loader password is not set.

Reset / Recover forgotten root password on CentOS 7 / RHEL 7

Follow the given below procedure to reset forgotten root password.

Step 1: Reboot or start the system, edit grub2

Restart/start the system and on getting GRUB 2 boot screen, first press ESC key so that screen get stopped. Then press e key for editing

vbox-1

Step 2: Initialize the /bin/sh

Now in next screen, scroll down with the help of arrow key and search for any of these two keyword linux16 or linuxefi on UEFI systems.In our case, we have linux16.

Disable rhgb and quiet parameters in order to enable system messages.

In first screenshot you can see, we first scrolldown to line starting with keyword called linux16 . Now remove the parameter rhgb and quiet .

root-passwd-2

In second screenshot you can see, we have removed the rhgb and quiet parameter
Add the below given parameter at the end of line, to initialize the sh shell.

init=/bin/sh

Now press CTRL with x keyword to boot the system. .

root-password-3

Step 3: Remount / root partition , reset root password and autorelable

The filesystem will be in read only mode, hence run the below given command so that you can write on filesystem

mount -o remount, rw /

Now reset root password with given below command

passwd root

Reconfirm the root password.

NOTE: In case system is not writable, the passwd tool fails with the following error:
Authentication token manipulation error

Now run the below given command for relabeling the SELINUX

touch /.autorelabel

Now restart the system. You can use any one of the command.

exec /sbin/init

OR

exec /sbin/reboot

vbox-6

You will see the system is going to reboot and stuck for a short time. Just wait for a few seconds or minute. Keep pay attention that the screen is stopped when SELIUX relabeling info message appeared on screen.
After a few moment, you will see at the bottom of screen some numerical percentage is running. It states about the completion of selinux relabeling in percentage. After completing 100% , the system will be rebooted.

vbox-7

After successful booting, you can use your new root password for login into system.

vbox-8

That is all!

Continue Reading