Showing posts with label CentOS. Show all posts
Showing posts with label CentOS. Show all posts

Monday, 24 April 2017

Check Port on Centos 7 or Redhat 7

Check Firewall setting 
[root@gukapi guk.weblens.co.uk]# firewall-cmd --list-ports
9020/tcp 80/tcp 443/tcp
[root@gukapi guk.weblens.co.uk]# firewall-cmd --list-all
public
  target: default
  icmp-block-inversion: no
  interfaces:
  sources:
  services: ssh dhcpv6-client gukapi
  ports: 9020/tcp 80/tcp 443/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:


Check port is listening or not.

[root@gukapi services]# netstat -anp | grep 9020
[root@gukapi services]#
[root@gukapi services]# ps -ef | grep dotnet
root     10000  8127  0 15:08 pts/1    00:00:00 grep --color=auto dotnet


Start the application

[root@gukapi guk.weblens.co.uk]# dotnet WhatsApp.API.d
WhatsApp.API.deps.json  WhatsApp.API.dll
[root@gukapi guk.weblens.co.uk]# dotnet WhatsApp.API.dll
Hosting environment: Production
Content root path: /root/dotname/gukapi/guk.weblens.co.uk
Now listening on: http://localhost:9020
Application started. Press Ctrl+C to shut down.

Check Port again & We can also test with telent command.

 --- Using netstat
/etc/firewalld/services
[root@gukapi services]# cd /root/dotname/gukapi/guk.weblens.co.uk
[root@gukapi guk.weblens.co.uk]# netstat -anp | grep 9020
tcp        0      0 127.0.0.1:9020          0.0.0.0:*               LISTEN      10018/dotnet
tcp6       0      0 ::1:9020                :::*                    LISTEN      10018/dotnet
[root@gukapi guk.weblens.co.uk]#

  --- Using Telnet
[root@gukapi guk.weblens.co.uk]# telnet localhost 9020
Trying ::1...
Connected to localhost.
Escape character is '^]'.

Thursday, 17 May 2012

CentOS: Enable CentOS GNOME Desktop


Mostly the CentOS servers that I am using is run on CLI (Command-Line Interface) mode. But in some cases, I need to have a desktop to install some applications with GUI (Grapich User Interface) mode. In this case, I will use GNOME, the most popular user-friendly desktop for any UNIX based system.
Variable that I used as below:
OS: CentOS 6.2 64bit
Desktop environment: GNOME
1. To add Gnome/GUI to a minimal CentOS 6 install run
 (short name version):
yum groupinstall basic-desktop desktop-platform x11 fonts
Or for the “long name” version:
yum groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts"


2. Since previously the server is running on CLI mode, we need to change some value to tell CentOS to boot up in the GUI mode. Open /etc/inittab via text editor and change following line:
id:3:initdefault:
To:
id:5:initdefault:
3. Reboot:
$ init 6
Note: You can switch from GUI to CLI mode manually by using following method:
GUI to CLI: Ctrl + Alt + F6
CLI to GUI: Ctrl + Alt + F1
If you want to start the desktop from CLI console (not SSH session), use following command:
$ startx
In some cases, when you login into the system via GUI, you will see some kind of weird boxes replacing the fonts. You can overcome this problem by installing fonts group via yum:
$ yum groupinstall -y fonts
Done! We now have user-friendly interface like below:

Thursday, 1 December 2011

Minimal X11 Client on CentOS/REHL 5


To run X client apps remotely on CentOS5 from your X server requires installation of a couple of small packages.
yum install xorg-x11-apps — installed with dependancies to get basic X11 client components. Also includes xeyes and xclock, useful for testing.
yum install xorg-x11-xauth — needed for ssh authentication.
ssh -X user@client
xclock

Wednesday, 30 March 2011

Oracle Validated Configuration RPM for OEL5

root@OEL5# ls -l /etc/yum.repos.d
total 0
yum repolist all reports all available repositories and their statuses.
[root@OEL5 yum.repos.d]# yum repolist all
Loaded plugins: security
repo id repo name status
el5_addons Enterprise Linux 5 – i386 – addons disabled
el5_ga_base Enterprise Linux 5 GA – i386 – base disabled
el5_oracle_addons Enterprise Linux 5 – i386 – oracle_addon disabled
el5_u1_base Enterprise Linux 5 U1 – i386 – base disabled
el5_u2_base Enterprise Linux 5 U2 – i386 – base disabled
el5_u3_base Enterprise Linux 5 U3 – i386 – base disabled
el5_u4_base Enterprise Linux 5 U4 – i386 – base disabled
repolist: 0
[root@OEL5 yum.repos.d]#
root@OEL5# cd /etc/yum.repos.d
root@OEL5# wget http://public-yum.oracle.com/public-yum-el5.repo
a file named “public-yum-el5.repo” will be saved to /etc/yum.repos.d
Open public-yum-el5.repo in a text editor(vi or gedit)
Locate the section in the file for the repository you plan to update from, e.g. [el5_ga_base]
Change enabled=0 to enabled=1
I changed enabled=0 to enabled=1 in el5_ga_base and the status changed from disabled to enabled.
You can even change enabled=1 for all repositories but the usual claim is that with many repositories
enabled there might be conflicts between repositories while searching for rpms.
Till date I have not faced any problems with all my repositories enabled.
[root@OEL5 yum.repos.d]# yum repolist all
Loaded plugins: security
repo id repo name status
el5_addons Enterprise Linux 5 – i386 – addons disabled
el5_ga_base Enterprise Linux 5 GA – i386 – base enabled: 3,204
el5_oracle_addons Enterprise Linux 5 – i386 – oracle_addon disabled
el5_u1_base Enterprise Linux 5 U1 – i386 – base disabled
el5_u2_base Enterprise Linux 5 U2 – i386 – base disabled
el5_u3_base Enterprise Linux 5 U3 – i386 – base disabled
el5_u4_base Enterprise Linux 5 U4 – i386 – base disabled
repolist: 3,204
[root@OEL5 yum.repos.d]#
[root@dhcppc4 yum.repos.d]# yum install oracle-validated
or 
[root@localhost Server]# pwd
/media/Enterprise Linux dvd 20090908/Server
[root@localhost Server]# yum install ./oracle-validated-1.0.0-18.el5.i