Versiones más recientes de software, por ejemplo Python 3.6, pueden instalarse en Centos 6.x empleando los SCL (Software collection).
El CentOS 6.10 trae por ejemplo el paquete python-2.6.6-68.el6_10.x86_64.
Pero si se requiere instalar una versión más reciente como la 3.6 se tendrían que actualizar un conjunto de directorios y bibliotecas que afectarían a la instalación original.
En vez de emplear un contenedor, es suficiente cambiar unas cuantas variables de ambiente para que estas apunten a otros nuevos directorios que contendrán las nuevas bibliotecas, códigos fuentes, etc. necesarios para que corran estas nuevas versiones de software y así no afecten a la configuración original de la instalación del sistema. Esto es lo que justamente se resuelve con el SCL.
Instalación del SCL
1. Instalar los repositorios CentOS-SCLo-scl.repo y de CentOS-SCLo-scl-rh.repo, mediante:
yum -y install centos-release-scl install centos-release-scl-rh
2. Instalar scl-utlis si aún no está instalado:
yum -y install scl-utils
3. Si es que ya existen, se pueden verificar qué versiones hay ya instaladas de SCL de Python:
scl -l | grep -i python
4. En mi caso, se instaló la rh-python36:
yum -y install rh-python36 rh-python36-runtime
En este caso, se puede ver que el paquete rh-python36 queda instalado en un directorio alternativo que está a partir de /opt y que además se crea una nuevo árbol de directorios que contiene los archivos, bibliotecas, etc. necesarios para que corra dicha versión:
cd /opt/rh/rh-python36
ls
enable root
ls root
bin dev lib media opt root selinux sys usr
boot home lib64 mnt proc sbin srv tmp
Algunos directorios están vacíos, pero los directorios como lib y lib64 contienen las bibliotecas correspondientes que son requeridas por el python36.
5. Conforme se fueron necesitando diferentes bibliotecas se instalaron los siguientes paquetes:
rh-python36-python-libs-3.6.9-2.el6.x86_64
rh-python36-2.0-1.el6.x86_64
rh-python36-python-virtualenv-15.1.0-2.el6.noarch
rh-python36-python-setuptools-36.5.0-1.el6.noarch
rh-python36-python-3.6.9-2.el6.x86_64
rh-python36-python-pip-9.0.1-2.el6.noarch
rh-python36-python-nose-1.3.7-3.el6.noarch
rh-python36-numpy-1.13.1-1.el6.x86_64
rh-python36-runtime-2.0-1.el6.x86_64
rh-python36-numpy-f2py-1.13.1-1.el6.x86_64
rh-python36-python-devel-3.6.9-2.el6.x86_64
rh-python36-python-tkinter-3.6.9-2.el6.x86_64
rh-python36-scipy-0.19.1-2.el6.x86_64
Por ejemplo: instalación de las bibliotecas necesarias para el ploteo:
yum -y install rh-python36-python-tkinter.x86_64
O si se desea instalar todos los paquetes mencionados:
yum -y install rh-python36-python-libs-3.6.9-2.el6.x86_64 rh-python36-2.0-1.el6.x86_64 rh-python36-python-virtualenv-15.1.0-2.el6.noarch rh-python36-python-setuptools-36.5.0-1.el6.noarch rh-python36-python-3.6.9-2.el6.x86_64 rh-python36-python-pip-9.0.1-2.el6.noarch rh-python36-python-nose-1.3.7-3.el6.noarch rh-python36-numpy-1.13.1-1.el6.x86_64 rh-python36-runtime-2.0-1.el6.x86_64 rh-python36-numpy-f2py-1.13.1-1.el6.x86_64 rh-python36-python-devel-3.6.9-2.el6.x86_64 rh-python36-python-tkinter-3.6.9-2.el6.x86_64 rh-python36-scipy-0.19.1-2.el6.x86_64
6. Algunos paquetes se tuvieron que instalar con el 'pip' ( ¿Package installer for Python ? ). Por ejemplo:
pip install scipy
Lista de paquetes que se necesitarion instalar por medio de pip:
pip list
cycler (0.10.0)
kiwisolver (1.1.0)
matplotlib (3.2.0)
nose (1.3.7)
numpy (1.18.1)
pandas (1.0.1)
pip (9.0.1)
pyparsing (2.4.6)
python-dateutil (2.8.1)
pytz (2019.3)
scipy (0.19.1)
setuptools (36.5.0)
six (1.14.0)
virtualenv (15.1.0)
7. Si se desean instalar todos los paquetes anteriores podemos poner:
pip install cycler kiwisolver matplotlib nose numpy pandas pip pyparsing python-dateutil pytz scipy setuptools six virtualenv
pip install sklearn sklearn-glvq sklearn-lvq sklearn-evaluation skippy scikit-learn
Nota para scikit-learn y sklearn: Es necesario que en el mismo directorio no exista un archivo que se llame queue.py , ya qua este produce errores de compilación en el sistema. Si existe, es necesario cambiarle de nombre o quitqalo de allí.
8. En ocasiones suele pedir que se actualice el pip. ejemplo:
pip install --upgrade pip
9. Una vez instalado el nuevo SCL y los paquetes necesarios de Python, para cambiarse de contexto de instalación (modificación de las variables de ambiente) y ejecutar un programa en este nuevo contexto, simplemente se le pone:
scl enable rh-python36 bash
Por ejemplo, en el caso del ambiente de desarrollo Geany, para que levante con el Python 3.6, se le pone:
/usr/bin/scl enable rh-python36 /usr/bin/geany
o si se desea siempre trabajar con dicho ambiente, se puede modificar el profile del usuario cambiando las variables con el comando:
source scl_source enable rh-python36
Esto es necesario ya que si se ejecuta el comando de scl enable rh-python36 bash en el profile, este indefinidamente, en forma recursiva, levantará shells en cuanto entre el usuario a su cuenta.
Algunas referencias:
Translate
lunes, 9 de marzo de 2020
sábado, 22 de febrero de 2020
Install Seamonkey on CentOS 8
1. Download the compiled tar file from:
https://www.seamonkey-project.org/
For example, download it from:
https://archive.mozilla.org/pub/seamonkey/releases/2.49.5/linux-x86_64/en-US/seamonkey-2.49.5.tar.bz2
2. As user root, move it to /usr/local and untar it:
sudo -i
mv seamonkey-2.49.5.tar.bz2 /usr/local
cd /usr/local
tar xvfj seamonkey-2.49.5.tar.bz2
3. Erase the tar file:
rm -f seamonkey-2.49.5.tar.bz2
4. Create the necessary links:
ln -s /usr/local/seamonkey/seamonkey /usr/local/bin/seamonkey
(Optional):
ln -s /usr/local/seamonkey/chrome/icons/default/seamonkey.png /usr/share/icons/hicolor/128x128/apps/seamonkey.png
5. Test as normal user:
seamonkey &
6. Create a menu entry in the Applications menu for all the users:
cat<<EOF_DESKTOP>/usr/share/applications/seamonkey.desktop
[Desktop Entry]
Name=Seamonkey
GenericName=Web Browser
Comment=Lightly browse the Web
Exec=/usr/local/bin/seamonkey
Icon=seamonkey
Terminal=false
Type=Application
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
EOF_DESKTOP
https://www.seamonkey-project.org/
For example, download it from:
https://archive.mozilla.org/pub/seamonkey/releases/2.49.5/linux-x86_64/en-US/seamonkey-2.49.5.tar.bz2
2. As user root, move it to /usr/local and untar it:
sudo -i
mv seamonkey-2.49.5.tar.bz2 /usr/local
cd /usr/local
tar xvfj seamonkey-2.49.5.tar.bz2
3. Erase the tar file:
rm -f seamonkey-2.49.5.tar.bz2
4. Create the necessary links:
ln -s /usr/local/seamonkey/seamonkey /usr/local/bin/seamonkey
(Optional):
ln -s /usr/local/seamonkey/chrome/icons/default/seamonkey.png /usr/share/icons/hicolor/128x128/apps/seamonkey.png
5. Test as normal user:
seamonkey &
6. Create a menu entry in the Applications menu for all the users:
cat<<EOF_DESKTOP>/usr/share/applications/seamonkey.desktop
[Desktop Entry]
Name=Seamonkey
GenericName=Web Browser
Comment=Lightly browse the Web
Exec=/usr/local/bin/seamonkey
Icon=seamonkey
Terminal=false
Type=Application
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
EOF_DESKTOP
viernes, 21 de febrero de 2020
Instalación de wxmaxima en CentOS 8
1. Instalar maxima como se indica en :
Instalación de maxima y xmaxima en Centos 8
2. Instalar el paquete wxGTK3-devel
sudo yum -y install wxGTK3-devel.x86_64
3. Bajar algún release del código fuente de wxmaxima, por ejemplo:
https://github.com/wxMaxima-developers/wxmaxima/archive/Version-20.02.1.tar.gz
4. Desempacar el archivo tar:
tar xvfz wxmaxima-Version-20.02.1.tar.gz
5. Cambiarse al directorio creado, compilar el programa e instalarlo. Por ejemplo:
cd wxmaxima-Version-20.02.1/
mkdir -p build
cd build
cmake ..
cmake --build .
sudo cmake --build . -- install
6. Probar la instalación con:
wxmaxima
El icono de wxmaxima para el launcher lo deja ubicado en:
/usr/local/share/pixmaps/wxmaxima-32.xpm
Nota: Aparentemente se puede construir el RPM poniendo el siguiente comando, pero el paquete resultante entra en conflicto con otros instalados:
cmake --build . -- package
Instalación de maxima y xmaxima en Centos 8
2. Instalar el paquete wxGTK3-devel
sudo yum -y install wxGTK3-devel.x86_64
3. Bajar algún release del código fuente de wxmaxima, por ejemplo:
https://github.com/wxMaxima-developers/wxmaxima/archive/Version-20.02.1.tar.gz
4. Desempacar el archivo tar:
tar xvfz wxmaxima-Version-20.02.1.tar.gz
5. Cambiarse al directorio creado, compilar el programa e instalarlo. Por ejemplo:
cd wxmaxima-Version-20.02.1/
mkdir -p build
cd build
cmake ..
cmake --build .
sudo cmake --build . -- install
6. Probar la instalación con:
wxmaxima
El icono de wxmaxima para el launcher lo deja ubicado en:
/usr/local/share/pixmaps/wxmaxima-32.xpm
Nota: Aparentemente se puede construir el RPM poniendo el siguiente comando, pero el paquete resultante entra en conflicto con otros instalados:
cmake --build . -- package
Instalación de maxima y xmaxima en Centos 8
1. Ir al sitio de maxima o de sourceforge y descargar las versiones disponibles de maxima. Por ejemplo:
https://sourceforge.net/projects/maxima/files/Maxima-Linux/5.43.0-Linux/
2. Descargar los archivos:
maxima-exec-gcl-5.43.0-1.x86_64.rpm
maxima-5.43.0-1.x86_64.rpm
maxima-xmaxima-5.43.0-1.x86_64.rpm
3. Instalar el gnuplot:
sudo yum -y install gnuplot
4. Instalar el ncurses-devel. Este paquete es para compilar el compat-readline que se necesita más adelante:
yum -y install ncurses-devel
5. Bajar el archivo compat-readline6-6.3-17.fc31.src.rpm . Este archivo provee la biblioteca libreadline.so.6()(64bit) .
Es necesario compilarlo y crear el RPM. El archivo se puede bajar de rpm.pbone.net:
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/releases/31/Everything/source/tree/Packages/c/compat-readline6-6.3-17.fc31.src.rpm
6. Crear el RPM con:
Sino está instalado el paquete rpm-build, instalarlo:
sudo yum -y install rpm-build-4.14.2-36.el8.x86_64
rpm -ivh compat-readline6-6.3-17.fc31.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bb compat-readline6.spec
Instalar el paquete crado con:
cd ~/rpmbuild/RPMS/x86_64/
sudo yum -y install ./compat-readline6-6.3-17.el8.x86_64.rpm
7. Instalar los paquetes de maxima con:
sudo yum -y install ./maxima-5.43.0-1.x86_64.rpm ./maxima-exec-gcl-5.43.0-1.x86_64.rpm ./maxima-xmaxima-5.43.0-1.x86_64.rpm
8. Probar maxima y xmaxima con:
maxima
Maxima 5.43.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information
_
https://sourceforge.net/projects/maxima/files/Maxima-Linux/5.43.0-Linux/
2. Descargar los archivos:
maxima-exec-gcl-5.43.0-1.x86_64.rpm
maxima-5.43.0-1.x86_64.rpm
maxima-xmaxima-5.43.0-1.x86_64.rpm
3. Instalar el gnuplot:
sudo yum -y install gnuplot
4. Instalar el ncurses-devel. Este paquete es para compilar el compat-readline que se necesita más adelante:
yum -y install ncurses-devel
5. Bajar el archivo compat-readline6-6.3-17.fc31.src.rpm . Este archivo provee la biblioteca libreadline.so.6()(64bit) .
Es necesario compilarlo y crear el RPM. El archivo se puede bajar de rpm.pbone.net:
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/linux/releases/31/Everything/source/tree/Packages/c/compat-readline6-6.3-17.fc31.src.rpm
6. Crear el RPM con:
Sino está instalado el paquete rpm-build, instalarlo:
sudo yum -y install rpm-build-4.14.2-36.el8.x86_64
rpm -ivh compat-readline6-6.3-17.fc31.src.rpm
cd ~/rpmbuild/SPECS
rpmbuild -bb compat-readline6.spec
Instalar el paquete crado con:
cd ~/rpmbuild/RPMS/x86_64/
sudo yum -y install ./compat-readline6-6.3-17.el8.x86_64.rpm
7. Instalar los paquetes de maxima con:
sudo yum -y install ./maxima-5.43.0-1.x86_64.rpm ./maxima-exec-gcl-5.43.0-1.x86_64.rpm ./maxima-xmaxima-5.43.0-1.x86_64.rpm
8. Probar maxima y xmaxima con:
maxima
Maxima 5.43.0 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.12
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information
_
Recuperación del sistema de archivos de un volumen lógico perdido Recovering file system from a logic volume LVM
Problema:
La información del LVM fue borrada y no hubo de manera de recuperar el LVM.
No se cuenta con la información del LVM ya que no aparece al ejecutar el comando lvs ni tampoco hay archivos de respaldo de la configuración en /etc/lvm.
El LVM está contenido en un solo volumen físico contenido en una memoria de tipo USB.
No se cuenta con la información del LVM ya que no aparece al ejecutar el comando lvs ni tampoco hay archivos de respaldo de la configuración en /etc/lvm.
El LVM está contenido en un solo volumen físico contenido en una memoria de tipo USB.
1. Verificamos las particiones de la USB:
# parted /dev/sdc p
Model: SanDisk Ultra (scsi)
Disk /dev/sdc: 15.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 211MB 210MB fat16 EFI System Partition boot, esp
2 211MB 1285MB 1074MB xfs msftdata
3 1285MB 15.7GB 14.4GB lvm
2. Los archivos a recuperar son de la partición 3 marcada con el flag 'lvm'. Podemos ver la información contenida en esta partición, mediante:
# hexdump -C /dev/sdc3 | head -12
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00001000 16 d6 8e db 20 4c 56 4d 32 20 78 5b 35 41 25 72 |.... LVM2 x[5A%r|
00001010 30 4e 2a 3e 01 00 00 00 00 10 00 00 00 00 00 00 |0N*>............|
00001020 00 f0 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00001030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00001200 63 65 6e 74 6f 73 20 7b 0a 69 64 20 3d 20 22 41 |centos {.id = "A|
00001210 66 4c 31 55 61 2d 32 50 34 58 2d 5a 6f 75 64 2d |fL1Ua-2P4X-Zoud-|
00001220 6b 31 63 46 2d 45 32 44 51 2d 61 79 46 36 2d 76 |k1cF-E2DQ-ayF6-v|
00001230 70 7a 30 75 70 22 0a 73 65 71 6e 6f 20 3d 20 31 |pz0up".seqno = 1|
00001240 0a 66 6f 72 6d 61 74 20 3d 20 22 6c 76 6d 32 22 |.format = "lvm2"|
Más adelante podemos ver que existe un file system XFS, en:
00001cb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00100000 58 46 53 42 00 00 10 00 00 00 00 00 00 35 a0 00 |XFSB.........5..|
00100010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00100020 23 f4 10 71 76 ca 4c 14 96 21 ae 3d 02 4b 96 f4 |#..qv.L..!.=.K..|
00100030 00 00 00 00 00 20 00 04 00 00 00 00 00 00 00 40 |..... .........@|
00100040 00 00 00 00 00 00 00 41 00 00 00 00 00 00 00 42 |.......A.......B|
00100050 00 00 00 01 00 0d 68 00 00 00 00 04 00 00 00 00 |......h.........|
00100060 00 00 0a 00 b4 b5 02 00 02 00 00 08 00 00 00 00 |................|
3. Este file system lo podemos montar usando el dispositivo loop con el 'offset' indicado:
losetup /dev/loop0 /dev/sdc3 --offset $((0x100000))
4. Podemos verificar que sí es un XFS:
file -s /dev/loop0
/dev/loop0: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)
5. Y lo montamos:
cd /mnt
mkdir fs
mount /dev/loop0 fs
cd fs
ls
bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
Referencias:
https://www.robmeerman.co.uk/unix/lvm_recovery
sábado, 7 de diciembre de 2019
FTP port porfwarding through SSH tunnel
Tested in:
OS: CentOS 6.10 and CentOS 7.7.1908
SSH server: openssh-server-5.3p1-124.el6_10, openssh-server-7.4p1-21.el7
FTP server: pure-ftpd-1.0.30-1.el6, pure-ftpd-1.0.47-2.el7
FTP client: ftp-0.17-54.el6.x86, ftp-0.17-67.el7
FTP ports
FTP uses one control FTP port ( the standard is port number 21) . This port allows to a client authenticate to the server, change directory and execute other commands but it is not used for data transfers or output for the listing command.
FTP uses various ports for data transfers. In passive mode, the FTP server receives data connections through these ports. The range of the ports are configured in the Pure-FTP server by the parameter "PassivePortRange". Every time a data connection is made to the FTP server, it informs to the client in which port will be accepted the connection.
In order to port forward de FTP ports through a SSH tunnel, is necessary to tunnel not only the port 21 (control port), but also the data ports that the server will use.
For Local Port Forwarding
FTP server side (destination host):
#Edit pure-ftpd configuration file:
vi /etc/pure-ftpd/pure-ftpd.conf
#Restrain the number of passive ports:
# PassivePortRange 30000 50000
PassivePortRange 30000 30001
#After edition restart server
Client side (origin host):
#SSH Tunel:
ssh -L2121:localhost:21 -L30000:localhost:30000 -L30001:localhost:30001 username@addressofserver
#FTP Client connection:
ftp localhost 2121
#FTP Client verbose connection (for example, show opened ports):
ftp -d localhost 2121
Note:
Opened ports are shown as: (127,0,0,1,117,48). It means:
127,0,0,1 is the IP address ( 127.0.0.1)
117,48 are the high and low bytes of the 16 bit opened port
Hence 117*256 + 48 = 30000
For Local Port Forwarding to another host besides de SSH server host address:
Server side:
#Edit pure-ftpd configuration file and modify ForcePassiveIP parameter:
vi /etc/pure-ftpd/pure-ftpd.conf
# Force client to open localhost IP address in PASV/EPSV/SPSV replies:
ForcePassiveIP 127.0.0.1
#After edition restart server
Client side:
#SSH Tunel:
ssh -L2121:anotherhost:21 -L30000:anotherhost:30000 -L30001:anotherhost:30001 username@addressofSSHserver
#FTP Client connection:
ftp localhost 2121
For Remote Port Forwarding:
FTP server side (host where the tunnel originates):
#Edit pure-ftpd configuration file:
vi /etc/pure-ftpd/pure-ftpd.conf
#Restrain the number of passive ports:
# PassivePortRange 30000 50000
PassivePortRange 30000 30001
#After edition restart server
#SSH Tunel:
ssh -R2121:localhost:21 -R30000:localhost:30000 -R30001:localhost:30001 mmendez@lab.anahuac.mx username@addressofSSHserver
Client side (host where the tunnel has its destiny):
#FTP Client connection:
ftp -p localhost 2121
#Example of session (client connects to localhost IPv6):
[mmendez@7 test]$ ssh -R2121:localhost:21 -R30000:localhost:30000 -R30001:localhost:30001 mmendez@servertest.com
Last login: Sat Dec 7 12:23:32 2019 from 172.19.34.52
[mmendez@servertest ~]$ ftp -d -p localhost 2121
Trying ::1...
Connected to localhost (::1).
220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
220-You are user number 1 of 1 allowed.
220-Local time is now 12:26. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name (localhost:mmendez):
---> USER mmendez
331 User mmendez OK. Password required
Password:
---> PASS XXXX
230 OK. Current restricted directory is /
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd test
---> CWD test
250 OK. Current directory is /test
ftp> ls -l
ftp: setsockopt (ignored): Permission denied
---> EPSV 2
229 Extended Passive mode OK (|||30000|)
---> LIST -l
150 Accepted data connection
drwxrwxr-x 2 mmendez mmendez 23 Dec 7 12:26 .
drwx------ 41 mmendez mmendez 4096 Dec 7 12:25 ..
-rw-rw-r-- 1 mmendez mmendez 18 Dec 7 12:26 file1.txt
226-Options: -a -l
226 3 matches total
ftp> lcd /tmp
Local directory now /tmp
ftp> get file1.txt
local: file1.txt remote: file1.txt
---> TYPE I
200 TYPE is now 8-bit binary
ftp: setsockopt (ignored): Permission denied
---> EPSV 2
229 Extended Passive mode OK (|||30000|)
---> RETR file1.txt
150 Accepted data connection
226-File successfully transferred
226 0.000 seconds (measured here), 187.13 Kbytes per second
18 bytes received in 2.5e-05 secs (720.00 Kbytes/sec)
ftp> !ls -al file1.txt
/bin/bash
-rw-rw-r--. 1 mmendez mmendez 18 Dec 7 12:27 file1.txt
ftp> bye
---> QUIT
221-Goodbye. You uploaded 0 and downloaded 1 kbytes.
221 Logout.
[mmendez@servertest ~]$ cat /tmp/file1.txt
test file
for FTP
[mmendez@servertest ~]$
For Remote Port Forwarding connecting from another host besides de SSH server host address:
FTP server side (host where the tunnel originates):
#Edit pure-ftpd configuration file:
vi /etc/pure-ftpd/pure-ftpd.conf
#Restrain the number of passive ports:
# PassivePortRange 30000 50000
PassivePortRange 30000 30001
# Force client to open localhost IP address in PASV/EPSV/SPSV replies:
ForcePassiveIP anotherhostIPaddress
#Example:
#ForcePassiveIP 192.168.0.1
#After edition restart server :
#In Centos 6:
server pure-ftpd restart
#In Centos 7:
systemctl restart pure-ftpd
#SSH Tunel:
ssh -Ranotherhost:2121:localhost:21 -Ranotherhost:30000:localhost:30000 -Ranotherhost:30001:localhost:30001 username@addressofSSHserver
Client side (host where the tunnel has its destiny):
#FTP Client connection:
ftp -p anotherhost 2121
Some references:
- SSH, The Secure Shell: The Definitive Guide, 2nd Edition by Robert G. Byrnes, Richard E. Silverman, Daniel J. Barrett (Chapter 11.2 FTP and SSH )
domingo, 14 de julio de 2019
Instalación de Qucs - Quite Universal Circuit Simulator en Centos 6.x
Instalación de Qucs - Quite Universal Circuit Simulator en Centos 6.x
Probado en CentOS 6.10
Versión instalada de Qucs: 0.0.16
Qucs - Quite Universal Circuit Simulator es un simulador de circuitos tanto analógicos como digitales. La versión instalada se basa la versión de Fedora Core 21.
Versión rápida:
Bajar los rpms de :
wget -c http://lab.anahuac.mx/rpms/electronics-menu-1.0-7.el6.noarch.rpm
wget -c http://lab.anahuac.mx/rpms/freehdl-0.0.8-9.el6.x86_64.rpm
wget -c http://lab.anahuac.mx/rpms/iverilog-10-1.el6.x86_64.rpm
wget -c http://lab.anahuac.mx/rpms/qucs-0.0.16-7.el6.x86_64.rpm
- Instalar los paquetes (como root). Por ejemplo:
Versión menos corta:
Bajar archivo versión 0.0.16 y compilarlo de :
https://sourceforge.net/projects/qucs/
Bajar archivo versión 0.0.16 y compilarlo de :
https://sourceforge.net/projects/qucs/
O bajar fuentes de RPM, instalar y construir con rpmbuild de:
mkdir ~/.qucs/vhdl
o para todos los usuarios:
sudo su -c " echo 'mkdir -p ~/.qucs/vhdl' >> /etc/profile "
Esto evita el error de simulación digital:
"... cd: vhdl: No such file or directory..."
Referencias:
Quite Universal Circuit Simulator
Qucs: особенности цифровых схем
- http://rpm.pbone.net/index.php3/stat/26/dist/96/size/1399216/name/freehdl-0.0.8-9.fc21.src.rpm
- http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/iverilog-10-1.fc21.src.rpm
- http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/qucs-0.0.16-4.fc17.src.rpm
- http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/electronics-menu-1.0-20.fc29.src.rpm
mkdir ~/.qucs/vhdl
o para todos los usuarios:
sudo su -c " echo 'mkdir -p ~/.qucs/vhdl' >> /etc/profile "
Esto evita el error de simulación digital:
"... cd: vhdl: No such file or directory..."
Referencias:
Quite Universal Circuit Simulator
Qucs: особенности цифровых схем
domingo, 14 de abril de 2019
Montar partición encriptada con crypto_LUKS en CentOS
Para encontrar las particiones encriptadas:
blkid | grep crypto
o con:
lsblk -io NAME,TYPE,SIZE,FSTYPE,UUID,MOUNTPOINT | grep crypto
Montar manualmente con:
cryptsetup luksOpen /dev/mapper/volumen_a_montar nombre_mapper_nuevo
mount /dev/mapper/nombre_mapper_nuevo directorio
Para montar permanentemente al momento de arrancar el sistema:
Suponiendo que la partición contiene la etiqueta 'home':
Generamos /etc/crypttab:
blkid | grep crypto | grep home | cut -f2 -d' ' | while read uid; do echo dd-home $uid; done >> /etc/crypttab
Agregamos linea a /etc/fstab:
echo /dev/mapper/dd-home /mnt/dd/home ext4 defaults 1 2 >> /etc/fstab
Referencias:
https://evilshit.wordpress.com/2012/10/29/how-to-mount-luks-encrypted-partitions-manually/
https://evilshit.wordpress.com/2012/10/22/how-to-mount-a-luks-encrypted-partition-on-boot/
jueves, 17 de enero de 2019
Change User Agent general.useragent.override in Seamonkey Firefox CentOS 6
Change User Agent general.useragent.override in Seamonkey Firefox
or
Access web.whatsapp.com in Seamonkey
( some material taken from:Taken from:
https://www.howtogeek.com/113439/how-to-change-your-browsers-user-agent-without-installing-any-extensions/
)
Some sites like web.whatsapp.com do not accept some versions of browsers:
You can easily change this behavior by adding a new 'preference name' in the browser's configuration:
- In URL write:
- Right click on the names and select 'New->String'
- Write:
- In the string value write a known user agent string like:
If you are using Linux:
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
- And, if it is set, erase the value of:
Voilà!:
You can choose from a variety of user agent strings from:
http://useragentstring.com/pages/useragentstring.php/
For Firefox:
http://useragentstring.com/pages/useragentstring.php?name=Firefox
Suscribirse a:
Entradas (Atom)