Centos 7

Descargar como docx, pdf o txt
Descargar como docx, pdf o txt
Está en la página 1de 27

Centos 7

Cmo verificar la versin de CentOS o RHEL?

Si el sistema est ejecutando CentOS o RHEL usted puede utilizar este comando
para comprobar o determinar cul es la versin de su sistema operativo RHEL o
CentOS:
cat /etc/*release*

Arquitectura de Centos / RHEL / Ubuntu


uname -a

Si la salida de texto del comando uname arroja un texto que diga


i686 GNU/Linux o i386 GNU/Linux la arquitectura es de 32 bits, pero si
en cambio arroja algo que diga x86_64 GNU/Linux entonces es de 64
bits.

Que paquetes est instalados en Centos /


Ubuntu?
Tambin es comn necesitar saber que paquetes se han instalado en un
sistema Centos o Ubuntu ya sea para saber sobre un paquetes o
aplicacin especfico o para hacer una instalacin igual o similar en otro
servidor o escritorio. Para saber esto tienes esos comandos:
Paquetes Instalados en Centos / RHEL
rpm -qa | less

http://www.linuxito.com/gnu-linux/nivel-medio/407-que-hacer-despues-de-instalarcentos-7-con-kde
Permitir sudo

La primera tarea de configuracin consiste en permitir sudo a nuestro usuario


(en este ejemplo "emi") para que pueda realizar tareas administrativas
autenticndose con su contrasea (en vez de la de root). Tal como mencion
durante la instalacin, al momento de crear el usuario es posible agregarlo a
varios grupos. Si lo hemos agregado al grupo "wheel" durante la instalacin, no

ser necesario realizar este paso. De lo contrario, agregar al usuario al grupo


"wheel" para que pueda ejecutar sudo:
$ su
# usermod -a -G wheel emi
# exit
$ logout

Es necesario desloguearse y volver a ingresar para que el cambio surta efecto.


Configurar proxy HTTP

Si estamos en una red corporativa, muy probablemente hagamos uso de


Internet a travs de un proxy HTTP. Por lo tanto es necesario configurar el proxy
en Bash y yum. Si no se requiere el uso de un proxy HTTP, saltar este paso.
El artculo Configurar proxy en yum explica cmo configurar el proxy HTTP en el
gestor de paquetes yum y en el perfil Bash:
$ sudo nano /etc/yum.conf

Configurar el proxy utilizando la sintaxis:


proxy=http://host:puerto
$ sudo nano /root/.bash_profile

Configurar el proxy utilizando la sintaxis:


export http_proxy="http://usuario:contrasea@host:puerto"

Si el proxy no requiere autenticacin, utilizar:


export http_proxy="http://host:puerto"

http://www.dokuwiki.tachtler.net/doku.php?id=tachtler:centos_7__minimal_desktop_installation

Minimal Desktop GNOME

Um nun aus einer CentOS in der Version 7.0


Minimall Install Installation

eine

Minimal Desktop Installation

zu machen, sind nachfolgend beschriebene Schritte notwendig.


Nachfolgende rpm-Pakete werden mindestens bentigt:

Gruppe: X Window System


gnome-classic-session

Optional sind nachfolgende rpm-Pakte, jedoch dringend empfohlen:

control-center - GNOME 3 - Settings / Einstellungs-Zentrum


gnome-terminal - Terminal / shell unter GNOME 3
nautilus-open-terminal - Einbindung von Terminal / shell im Nautilus-Datei-Manager
und Aufruf ber die [rechte Maustaste]
liberation-mono-fonts - Schriftart fr eine bessere Darstellung im gnome-terminal

Installationsschritt: 1
Installation der rpm-Paket-Gruppe X Window Systems mit nachfolgendem Befehl:
# yum groupinstall "X Window System"
...
Complete!

Installationsschritt: 2
Installation des rpm-Pakets gnome-classic-session mit nachfolgendem Befehl:
# yum install gnome-classic-session
...
Complete!

Installationsschritt: 3
Installation der rpm-Pakete

control-center
gnome-terminal
nautilus-open-terminal
liberation-mono-fonts

mit nachfolgendem Befehl:


# yum install control-center gnome-terminal nautilus-open-terminal liberation-monofonts
...
Complete!

Installationsschritt: 4
Lsen der bisherigen Verknpfung des systemd
target - /etc/systemd/system/default.target von der bisherigen Verlinkung nach

/lib/systemd/system/multi-user.target

mit nachfolgendem Befehl:


# unlink /etc/systemd/system/default.target
Erstellen einer neuen Verknpfung des systemd
target - /etc/systemd/system/default.target auf die Verlinkung zu

/lib/systemd/system/graphical.target

mit nachfolgendem Befehl:


# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
Mit nachfolgendem Befehl kann berprft werden, ob das Lsen und das Erstellen der neuen
Verknpfung richtig ausgefhrt wurde, was mit nachfolgendem Befehl durchgefhrt werden kann
und nachfolgende Ausgabe erzeugen sollte:

# ll /etc/systemd/system/default.target
lrwxrwxrwx. 1 root root 36 Aug 8 14:25 /etc/systemd/system/default.target ->
/lib/systemd/system/graphical.target

HIWEIS - Damit wird beim Startvorgang des Servers in eine grafische Benutzeroberflche
gestartet !

Installationsschritt: 5
Neustart des Servers, was mit nachfolgendem Befehl durchgefhrt werden kann:
# reboot

Anmeldebildschirm
Nach Durchfhrung aller vorhergehenden Installationsschritte, sollte nachfolgender Bildschirm nach
dem Reboot (Neustart) des Servers erscheinen:

5. Install Command Line Web Browser


In most cases, specially in production environment, we usually install CentOS
as command line with no GUI, in this situation we must have a commandline
browsing tool to check websites via terminal. For this, we going to install a
most famous tool called links.

#yuminstalllinks

Links: Commandline Web Browsing

For usage and examples to browse web sites u links tool, read our
article Command Line Web Browsing with Links Tool

ERROR:nacl_fork_delegate_linux.cc(314)] Bad NaCl helper startup


ack (0 bytes)
Google Chrome Error :
Remove beta version if it is installed

sudo apt-get
--purge remove
google-chromebeta

Remove stable version if it is installed

sudo apt-get
--purge remove
google-chromestable

Install stable version again suppose it is 36.

dpkg -i googlechromestable_current_i38
6_36.0.deb

If above solution is not working, Run following command in your


terminal.

google-chrome
--no-sandbox
--user-data-dir

By using Googles official repository you will keep your Chrome browser upto-date. However, it should also work on RHEL 7.0/6.x, CentOS
7.0/6.x and Fedora 24-15 versions as well.

Step 1: Enable Google YUM repository


Create a file called /etc/yum.repos.d/google-chrome.repo and add the
following lines of code to it.

[googlechrome]

name=googlechrome

baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch

enabled=1

gpgcheck=1

gpgkey=https://dlssl.google.com/linux/linux_signing_key.pub

Step 2: Installing Chrome Web Browser


First, check whether the latest version available from the Googles own
repository using following yum command.

#yuminfogooglechromestable

Sample Output
Check Google Chrome Package Info

Loadedplugins:fastestmirror,langpacks,versionlock

Loadingmirrorspeedsfromcachedhostfile

*base:centosmirror.go4hosting.in

*epel:epel.scopesky.iq

*extras:centosmirror.go4hosting.in

*remisafe:mirror.cedia.org.ec

*rpmforge:mirror.smartmedia.net.id

*updates:centosmirror.go4hosting.in

AvailablePackages

Name:googlechromestable

Arch:x86_64

Version
: 53.0.2785.116
Release:1
Size:47M
Repo:googlechrome
Summary:GoogleChrome
URL:https://chrome.google.com/
License:Multiple,seehttps://chrome.google.com/
Description:ThewebbrowserfromGoogle
:
:GoogleChromeisabrowserthatcombinesaminimaldesignwithsophisticated
technologytomakethewebfaster,safer,andeasier.

Do you see the highlighted output in the above, that clearly telling that the
latest version of chrome is available from repository. So, lets install it
using yum command as shown below, which will automatically install all
needed dependencies.

#yuminstallgooglechromestable

Sample Output
Install Google Chrome in Linux

Loadedplugins:fastestmirror,langpacks,versionlock

Loadingmirrorspeedsfromcachedhostfile

*base:centosmirror.go4hosting.in

*epel:mirror.premi.st

*extras:centosmirror.go4hosting.in

*remisafe:mirror.cedia.org.ec

*rpmforge:mirror.smartmedia.net.id

*updates:centosmirror.go4hosting.in

ResolvingDependencies

>Runningtransactioncheck

>Packagegooglechromestable.x86_640:53.0.2785.1161willbeinstalled

>FinishedDependencyResolution

DependenciesResolved

==============================================================================
==========================

PackageArch
VersionRepository
Size

==============================================================================
==========================

Installing:

googlechromestablex86_64
53.0.2785.116-1googlechrome
47M
TransactionSummary
==============================================================================
==========================
Totaldownloadsize:47M
Installedsize:181M
Isthisok[y/d/N]:y

Update : Sadly, the Google Chrome browser no longer supports the most
famous commercial distribution RHEL 6.x and its free clones such
as CentOS and Scientific Linux.
Yes, theyve discontinued support for RHEL 6.X version as of Google
Chrome and on other side, latest Firefoxand Opera browsers run
successfully on the same platforms.
Luckily, there is a script developed by Richard Lloyd, that automatically
download and install latest Google Chrome browser by picking libraries from
a more recent released distro and put those libraries in
(/opt/google/chrome/lib) directory and then you can able to run Google
Chrome on RHEL/CentOS 6.x versions.

#wgethttp://chrome.richardlloyd.org.uk/install_chrome.sh

#chmodu+xinstall_chrome.sh

#./install_chrome.sh

Sample Output
Richard Lloyd Google Chrome Script

GoogleChromeInstaller7.50onthex86_64platform

(C)RichardK.Lloyd2016

***Creatingtemporarydirectory/tmp/chrome_install...

***Changingworkingdirectoryto/tmp/chrome_install...

***Generatingalistofoutofdatepackages(pleasewait)...

***Checkingforanupdatetoinstall_chrome.sh...

***Downloadingversion.dat(pleasewait)...

2016092002:11:44https://chrome.richardlloyd.org.uk/version.dat

Resolvingchrome.richardlloyd.org.uk(chrome.richardlloyd.org.uk)...
193.110.246.232

Connectingtochrome.richardlloyd.org.uk(chrome.richardlloyd.org.uk)|
193.110.246.232|:443...connected.

HTTPrequestsent,awaitingresponse...200OK

Length:5

Savingto:version.dat

100%
[=============================================================================
========================================================================>]5
.K/sin0s

2016092002:11:44(335KB/s)version.datsaved[5/5]

***install_chrome.shisalreadythelatestversion(7.50)continuing...

***DetermininglatestGoogleChromeversionnumber(pleasewait)...

***Downloadingchrome_versions.csv(pleasewait)...

2016092002:11:46http://omahaproxy.appspot.com/all?
os=linux&channel=stable

Resolvingomahaproxy.appspot.com(omahaproxy.appspot.com)...216.58.220.177,
2404:6800:4009:801::2011

Connectingtoomahaproxy.appspot.com(omahaproxy.appspot.com)|
216.58.220.177|:80...connected.

HTTPrequestsent,awaitingresponse...200OK

Length:318[text/plain]

Savingto:chrome_versions.csv

100%
[=============================================================================
========================================================================>]318
.K/sin0s

2016092002:11:46(39.1MB/s)chrome_versions.csvsaved[318/318]

***Latestgooglechromestableversionnumberis53.0.2785.116...
***Downloadinggooglechromestable_current_x86_64.rpm(pleasewait)...
2016092002:11:46https://dl.google.com/linux/direct/googlechrome
stable_current_x86_64.rpm
Resolvingdl.google.com(dl.google.com)...216.58.199.142,
2404:6800:4009:806::200e
Connectingtodl.google.com(dl.google.com)|216.58.199.142|:443...connected.
HTTPrequestsent,awaitingresponse...200OK
Length:49781619(47M)[application/xrpm]

Savingto:googlechromestable_current_x86_64.rpm
100%
[=============================================================================
========================================================================>]
4,97,81,6193.40MB/sin14s
2016092002:12:00(3.42MB/s)googlechromestable_current_x86_64.rpm
saved[49781619/49781619]
***GoogleChrome53.0.2785.116downloadedsuccessfully...
***InstallingGoogleChrome53.0.2785.116RPM(pleasewait)...
Preparing...#################################[100%]
Updating/installing...
1:googlechromestable53.0.2785.11#################################[100%]
Redirectingto/bin/systemctlstartatd.service
***GoogleChrome53.0.2785.116wasinstalledsuccessfully...
***/opt/google/chrometreecontains87filestotalling181MB...
***/tmp/chrome_installtreecontains1filestotalling47MB...
GoogleChrome53.0.2785.116wasinstalledsuccessfully.
Pleaserunthebrowserviathe'googlechrome'commandasanonrootuser.
ToupdateGoogleChrome,run"yumupdategooglechromestable"or
simplyrerunthisscriptwith"./install_chrome.sh".
TouninstallGoogleChrome,
run"yumremovegooglechromestable"or"./install_chrome.shu".

Step 3: Starting Chrome Web Browser


Start browser with non-root user.

#googlechrome&

Welcome screen of Chrome web browser.

http://www.tecmint.com/install-google-chrome-on-redhat-centos-fedora-linux/

How to install Webmin on CentOS 7


BY RASHO 13/08/2014

Webmin is a web-based graphical tool for unix . It is used to


manage services like User management, Disk
managemet, Network,Iptables (Firewall), Cron, Apache, DNS,
File sharing and much more .
In this article i will show you how to install webmin on CentOS 7
linux.

Install Webmin on CentOS 7


To get started, login your remote server and follow the steps
below:
First, create a new file webmin.repo in /etc/yum.repos.d/ :

vi/etc/yum.repos.d/webmin.repo

and paste below line:

[Webmin]

name=WebminDistributionNeutral

#baseurl=http://download.webmin.com/download/yum

mirrorlist=http://download.webmin.com/download/yum/mirrorlist

enabled=1

Install webmin GPG key using below command.

rpmimporthttp://www.webmin.com/jcameronkey.asc

Now, update the repositorys:

yumcheckupdate

Install webmin:

yuminstallwebminy

Start the service and make it start automatically

chkconfigwebminon

servicewebminstart

By default, Webmin will listen on port 10000. Enable webmin Port:

firewallcmdaddport=10000/tcp

Now, open http://ip.add.re.ss:10000 in your browser and enter yor


root username and password:

Webmin login screen

Webmin screen

http://lintut.com/how-to-install-webmin-on-centos-7/

yum install bzip2

Download Lynx and Links


1. Lynx http://lynx.browser.org/
2. Links http://links.twibright.com/

Installation of Lynx and Links


Install Lynx on Debian based Linux systems.

#aptgetinstalllynx

#aptgetinstalllinks

Install Lynx on Red Hat based Linux systems.

#yumyinstalllynx

#yumyinstalllinks

How to Use Lynx and Links


Open a link: lynx/links http://www.tecmint.com.

#lynxhttp://www.tecmint.com

OR

#linkshttp://www.tecmint.com

http://www.tecmint.com/command-line-web-browsers/

Webmin This web server is running in SSL


mode. Try the URL instead.
How to Fix the above error ?
I saw the above error while trying to access Webmin control panel in my web browser
after webmin installation. Error shows that you have you have accessed webmin
control panel URL without https in front. Web server is running in SSL mode so you
must try using https instead of http. Try the URL https://serverhostname:10000 OR
https://serverIP:10000 instead and check whether youre getting the same error.
Access Webmin in your web browser using any of the below URL :
https://serverhostname:10000
OR
https://serverIP:10000

serverhostname should be replaced with actual hostname of the server. ServerIP


should be replaced with IP address of your webmin server. When you access webmin
with https the browser will show certificate warning if SSL is not installed for your
server hostname. Accept the server self signed certificate and proceed. It is better to
access webmin using https instead of http because https is secure. Do the below
steps if you want to disable SSL for webmin control panel.
1. Log into your Linux Server via SSH as root.
2. Take a backup of the file /etc/webmin/miniserv.conf
3. Edit the file /etc/webmin/miniserv.conf using vi editor
4. Change the line ssl=1 to ssl=0 (disabled)
5. Save the changes and exit. Now SSL is disabled for webmin.

Disable SSL for webmin control panel

https://globedrill.com/webmin-this-web-server-is-running-in-ssl-mode-try-the-urlinstead/

Podremos comprobar el nombre de red DNS del equipo con:


hostname
Y ver la versin del kernel con:
uname -a

Tambin podremos comprobar la IP asignada con:


ip add
Nos mostrar la configuracin de cada interfaz de red y el identificativo, en
nuestro caso la tarjeta de red principal tiene el identificativo "ens160":

Y configurar la red manualmente con:


vi /etc/sysconfig/network-scripts/ifcfg-ens160
(donde ens160 ser el identificativo de la tarjeta de red que podemos
obtener con el comando anterior)

Un ejemplo de fichero de configuracin de red en Linux CentOS 7:


HWADDR="00:0C:XX:XX:XX:XX"
ENGINE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"

IPV6_FAILURE_FATAL="no"
NAME="ens160"
UUID="5fc69-xxx-xxx-xxx-xxx"
ONBOOT="yes"
IPADDR0= "192.168.1.100"
PREFIX0= "24"
GATEWAY0= "192.168.1.1"
DNS1= "8.8.8.8"

Si hemos modificado alguna opcin de red ser conveniente reiniciar el


servicio de red para que se apliquen los cambios, podremos hacerlo con:
systemctl restart network.service

Podremos probar la conexin a Internet realizando un ping a alguna pgina


web:
ping www.ajpdsoft.com

Luego debemos actualizar los paquetes ya existentes en el sistema (tomar algunos minutos):
1

yum update

Despus que Yum ha actualizado todo y nos permite continuar, debemos instalar varios paquetes
adicionales que se requieren en el servidor.
Para instalar un paquete que no est instalado ya, hay que usar la opcin de yum install, de la forma:
1

yum install [nombre-del-paquete]

Empezamos con:
1

yum groupinstall 'Development Tools'

A su vez, para instalar varios paquetes simultneamente es posible colocar los nombres de los mismos
separados por espacios. En este caso los paquetes que requerimos se obtienen con el comando (tomar
varios minutos):
1 yum install fetchmail wget bzip2 unzip zip nmap openssl lynx fileutils ncftp
gcc gcc-c++
La funcin de estos paquetes es:
fetchmail: Permite bajar correo electrnico desde un servidor remoto, el cual podr ser filtrado y
retransmitirlo al sistema local.
wget: Permite la descarga de contenidos desde servidores web de una forma simple. Actualmente
soporta descargas mediante los protocolos HTTP, HTTPS y FTP.
bzip2: Comprime y descomprime archivos ms eficientemente que gzip y winZip pero empleando ms
memoria y ms tiempo en su ejecucin.
unzip: Descomprime archivos zip.
zip: Comprime archivos zip.
nmap: Sirve para efectuar el rastreo de puertos. Se usa para evaluar la seguridad de sistemas
informticos, as como para descubrir servicios o servidores en una red.

openssl: Es un robusto paquete de herramientas de administracin y libreras relacionadas con la


criptografa, que suministran funciones criptogrficas a otros paquetes como OpenSSH y navegadores
web (para acceso seguro a sitios HTTPS). Estas herramientas ayudan al sistema a implementar el
Secure Sockets Layer (SSL), as como otros protocolos relacionados con la seguridad, como el Transport
Layer Security (TLS).
lynx: Es un navegador web y cliente de gopher en modo texto.
fileutils: Contiene los programas bsicos para la manipulacin de archivos. Incluye programas para
listar y crear directorios, actualizar las marcas de fechas, cambiar los permisos y ms (chgrp, chmod,
chown, cp, dd, df, dir, dircolors, du, install, ln, ls, mkdir, mkfifo, mknod, mv, rm, rmdir, shred, sync, touch y
vdir).
ncftp: Es una aplicacin para ftp perfecta para transferencia de archivos desde la consola SSH. Esta
aplicacin es til para hacer copias de seguridad automatizadas usando un cron.
gcc: Compilador de programas fuente en Lenguaje C.
gcc-c++: Compilador de programas fuente en Lenguaje C++.
Otros comandos importantes de Yum son:

jjjj

También podría gustarte